From 9feacbbb66bebe211cd96c9b068fd83c087a442f Mon Sep 17 00:00:00 2001 From: git-avc Date: Mon, 19 Jan 2026 00:41:01 +0100 Subject: [PATCH] fix: more linters --- frappe/public/js/frappe/form/controls/base_input.js | 7 +++++-- frappe/public/js/frappe/form/controls/data.js | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/frappe/public/js/frappe/form/controls/base_input.js b/frappe/public/js/frappe/form/controls/base_input.js index ba4b2bd0d3..3cd277a239 100644 --- a/frappe/public/js/frappe/form/controls/base_input.js +++ b/frappe/public/js/frappe/form/controls/base_input.js @@ -179,8 +179,11 @@ frappe.ui.form.ControlInput = class ControlInput extends frappe.ui.form.Control // This is used to display formatted output AND showing values in read only fields if (this.disp_area) { $(this.disp_area).html(display_value); - // Apply alignment for supported fields - if (this.df.alignment && ["Data", "Int", "Float", "Currency", "Percent"].includes(this.df.fieldtype)) { + // Apply alignment only for supported fields + if ( + this.df.alignment && + ["Data", "Int", "Float", "Currency", "Percent"].includes(this.df.fieldtype) + ) { $(this.disp_area).css("text-align", this.df.alignment.toLowerCase()); } } diff --git a/frappe/public/js/frappe/form/controls/data.js b/frappe/public/js/frappe/form/controls/data.js index 5bb401a92c..dcaf1cab44 100644 --- a/frappe/public/js/frappe/form/controls/data.js +++ b/frappe/public/js/frappe/form/controls/data.js @@ -251,8 +251,11 @@ frappe.ui.form.ControlData = class ControlData extends frappe.ui.form.ControlInp if (this.df.input_class) { this.$input.addClass(this.df.input_class); } - // Apply alignment if specified for supported field types - if (this.df.alignment && ["Data", "Int", "Float", "Currency", "Percent"].includes(this.df.fieldtype)) { + // Apply alignment for supported field types + if ( + this.df.alignment && + ["Data", "Int", "Float", "Currency", "Percent"].includes(this.df.fieldtype) + ) { this.$input.css("text-align", this.df.alignment.toLowerCase()); } }