fix: handle some more cases

This commit is contained in:
sokumon 2026-02-08 22:51:03 +05:30
parent 4040841fd1
commit bcde2d8fdb
3 changed files with 12 additions and 5 deletions

View file

@ -147,7 +147,6 @@ frappe.ui.form.ControlInput = class ControlInput extends frappe.ui.form.Control
me.set_description();
me.set_label();
me.set_doc_url();
// me.set_info_url();
me.set_mandatory(me.value);
me.set_bold();
me.set_required();

View file

@ -10,7 +10,13 @@ export class InfoCard {
}
make_toggle_button() {
$(
`${frappe.utils.icon("message-circle-question-mark", "sm", "", "", "cursor-pointer")}`
`${frappe.utils.icon(
"message-circle-question-mark",
"sm",
"",
"",
"cursor-pointer m-0"
)}`
).appendTo($(this.label_span));
$(this.label_span).find("svg").attr("role", "button");
$(this.label_area).css({

View file

@ -60,9 +60,11 @@ frappe.ui.SidebarCard = class SidebarCard {
});
}
set_styles() {
const $root = $(":root");
for (const [variable, value] of Object.entries(this.styles)) {
$root.css(`--${variable}`, value);
if (this.styles) {
const $root = $(":root");
for (const [variable, value] of Object.entries(this.styles)) {
$root.css(`--${variable}`, value);
}
}
}
};