add user image update dailog
This commit is contained in:
parent
375fa9205e
commit
df6cd1e6ad
2 changed files with 32 additions and 1 deletions
|
|
@ -66,4 +66,29 @@ frappe.social.post_reply_dialog.set_primary_action(__('Reply'), () => {
|
|||
frappe.social.post_reply_dialog.clear();
|
||||
frappe.social.post_reply_dialog.hide();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
frappe.social.update_user_image = new frappe.ui.Dialog({
|
||||
title: __("User Image"),
|
||||
fields: [
|
||||
{
|
||||
fieldtype: "Attach Image",
|
||||
fieldname: "image",
|
||||
label: __("Image"),
|
||||
reqd: 1,
|
||||
default: frappe.user.image()
|
||||
},
|
||||
],
|
||||
primary_action_label: __('Upload'),
|
||||
primary_action: () => {
|
||||
const values = frappe.social.update_user_image.get_values();
|
||||
frappe.db.set_value('User', frappe.session.user, 'user_image', values.image)
|
||||
.then(() => {
|
||||
frappe.social.update_user_image.clear();
|
||||
frappe.social.update_user_image.hide();
|
||||
})
|
||||
.fail((err) => {
|
||||
frappe.msgprint(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ body[data-route*="social"] {
|
|||
.layout-main-section {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.liked-by-popover {
|
||||
font-size: @text-small;
|
||||
li {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.wall-container {
|
||||
display: flex;
|
||||
font-size: 12px;
|
||||
|
|
@ -121,4 +123,8 @@ body[data-route*="social"] {
|
|||
font-size: 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.missing-image {
|
||||
display: table-cell !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue