fix: more linters
This commit is contained in:
parent
7b012af2f4
commit
9feacbbb66
2 changed files with 10 additions and 4 deletions
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue