Просмотр исходного кода

feat(minor): fetch attachment_limit from get_max_file_size api

(cherry picked from commit 037746cddc)
version-14
phot0n 2 лет назад
committed by Mergify
Родитель
Сommit
5190a498f4
2 измененных файлов: 11 добавлений и 1 удалений
  1. +11
    -0
      frappe/email/doctype/email_domain/email_domain.js
  2. +0
    -1
      frappe/email/doctype/email_domain/email_domain.json

+ 11
- 0
frappe/email/doctype/email_domain/email_domain.js Просмотреть файл

@@ -4,6 +4,17 @@ frappe.ui.form.on("Email Domain", {
frm.dashboard.clear_headline();
let msg = __("Changing any setting will reflect on all the email accounts associated with this domain.");
frm.dashboard.set_headline_alert(msg);
} else {
if (!frm.doc.attachment_limit) {
frappe.call({
method: "frappe.core.api.file.get_max_file_size",
callback: function(r) {
if (!r.exc) {
frm.set_value("attachment_limit", Number(r.message)/(1024*1024));
}
},
});
}
}
}
})

+ 0
- 1
frappe/email/doctype/email_domain/email_domain.json Просмотреть файл

@@ -61,7 +61,6 @@
"label": "Use SSL"
},
{
"default": "1",
"description": "Ignore attachments over this size",
"fieldname": "attachment_limit",
"fieldtype": "Int",


Загрузка…
Отмена
Сохранить