fix: disabled checkbox should be disabled

(cherry picked from commit c7591d51c4)
This commit is contained in:
Sagar Vora 2021-04-28 13:34:11 +05:30 committed by mergify-bot
parent fec6aa4411
commit c2b13dac7b

View file

@ -97,11 +97,8 @@ frappe.form.formatters = {
}
},
Check: function(value) {
if (value) {
return `<input type="checkbox" class="disabled-selected">`;
} else {
return `<input type="checkbox" class="disabled-deselected">`;
}
return `<input type="checkbox" disabled
class="disabled-${value ? "selected" : "deselected"}">`;
},
Link: function(value, docfield, options, doc) {
var doctype = docfield._options || docfield.options;