Merge pull request #11041 from abhishekbalam/prevent_autoreply_inital_sync
This commit is contained in:
commit
02fa765dcc
1 changed files with 17 additions and 1 deletions
|
|
@ -95,6 +95,11 @@ frappe.ui.form.on("Email Account", {
|
|||
enable_incoming: function(frm) {
|
||||
frm.doc.no_remaining = null; //perform full sync
|
||||
//frm.set_df_property("append_to", "reqd", frm.doc.enable_incoming);
|
||||
frm.trigger("warn_autoreply_on_incoming");
|
||||
},
|
||||
|
||||
enable_auto_reply: function(frm) {
|
||||
frm.trigger("warn_autoreply_on_incoming");
|
||||
},
|
||||
|
||||
notify_if_unreplied: function(frm) {
|
||||
|
|
@ -184,7 +189,18 @@ frappe.ui.form.on("Email Account", {
|
|||
read as well as unread message from server. This may also cause the duplication\
|
||||
of Communication (emails).");
|
||||
frappe.confirm(msg, null, function() {
|
||||
frm.set_value("email_sync_option", "ALL");
|
||||
frm.set_value("email_sync_option", "UNSEEN");
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
warn_autoreply_on_incoming: function(frm) {
|
||||
if (frm.doc.enable_incoming && frm.doc.enable_auto_reply && frm.doc.__islocal) {
|
||||
var msg = __("Enabling auto reply on an incoming email account will send automated replies \
|
||||
to all the synchronized emails. Do you wish to continue?");
|
||||
frappe.confirm(msg, null, function() {
|
||||
frm.set_value("enable_auto_reply", 0);
|
||||
frappe.show_alert({message: __("Disabled Auto Reply"), indicator: "blue"});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue