Merge pull request #9066 from vishdha/remove_attachment
fix: on image remove event remove attach file.
This commit is contained in:
commit
1f9b87f899
1 changed files with 5 additions and 2 deletions
|
|
@ -88,7 +88,10 @@ frappe.ui.form.setup_user_image_event = function(frm) {
|
|||
}
|
||||
field.$input.trigger('click');
|
||||
} else {
|
||||
field.set_value('').then(() => frm.save());
|
||||
/// on remove event for a sidebar image wrapper remove attach file.
|
||||
frm.attachments.remove_attachment_by_filename(frm.doc[frm.meta.image_field], function() {
|
||||
field.set_value('').then(() => frm.save());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue