fix: restrict filetypes to csv for rename tool

This commit is contained in:
Ankush Menat 2022-02-10 10:20:14 +05:30 committed by Ankush Menat
parent b35b637d01
commit c371b52d27

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("");
}