refactor: use const instead of var in Select All/Unselect All functions

This commit is contained in:
circlecrystalin 2026-01-20 13:34:07 +01:00
parent a25b84ae24
commit b3b85b9090

View file

@ -709,8 +709,8 @@ frappe.PrintFormatBuilder = class PrintFormatBuilder {
$body.find("input[type='checkbox']").each(function () {
if (!$(this).prop("checked")) {
$(this).prop("checked", true);
var fieldname = $(this).attr("data-fieldname");
var input = get_width_input(fieldname);
const fieldname = $(this).attr("data-fieldname");
const input = get_width_input(fieldname);
input.prop("disabled", false);
}
});
@ -722,8 +722,8 @@ frappe.PrintFormatBuilder = class PrintFormatBuilder {
$body.find("input[type='checkbox']").each(function () {
if ($(this).prop("checked")) {
$(this).prop("checked", false);
var fieldname = $(this).attr("data-fieldname");
var input = get_width_input(fieldname);
const fieldname = $(this).attr("data-fieldname");
const input = get_width_input(fieldname);
input.prop("disabled", true);
input.val("");
}