Merge pull request #29226 from sokumon/email-account-ux

fix(UX) :Email account ux
This commit is contained in:
Soham Kulkarni 2025-01-20 12:59:40 +05:30 committed by GitHub
commit 7587c4666d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -115,7 +115,25 @@ function set_default_max_attachment_size(frm) {
});
}
}
function add_helpful_links(frm) {
// For better UX
switch (frm.doc.service) {
case "GMail":
frm.set_df_property(
"password",
"description",
'To generate password visit <a href="https://knowledge.workspace.google.com/kb/how-to-create-app-passwords-000009237"> here'
);
break;
case "Frappe Mail":
frm.set_df_property(
"api_secret",
"description",
'To know more visit <a href="https://github.com/frappe/mail"> here'
);
break;
}
}
frappe.ui.form.on("Email Account", {
service: function (frm) {
$.each(frappe.email_defaults[frm.doc.service], function (key, value) {
@ -126,6 +144,7 @@ frappe.ui.form.on("Email Account", {
frm.set_value(key, value);
});
}
add_helpful_links(frm);
},
use_imap: function (frm) {