fix: restrict filetypes to csv for rename tool

(cherry picked from commit c371b52d27)
This commit is contained in:
Ankush Menat
2022-02-10 10:20:14 +05:30
committed by Ankush Menat
parent a86e8f47e5
commit d062504593

View File

@@ -13,6 +13,12 @@ frappe.ui.form.on("Rename Tool", {
},
refresh: function(frm) {
frm.disable_save();
frm.get_field("file_to_rename").df.options = {
restrictions: {
allowed_file_types: [".csv"],
},
};
if (!frm.doc.file_to_rename) {
frm.get_field("rename_log").$wrapper.html("");
}