fix(formatter): Item Link formatter when input is disabled (#6263)
This commit is contained in:
parent
5966faa468
commit
18bfb6df5a
1 changed files with 3 additions and 2 deletions
|
|
@ -436,10 +436,11 @@ _f.Frm.prototype.set_indicator_formatter = function(fieldname, get_color, get_te
|
|||
frappe.meta.docfield_map[doctype][fieldname].formatter =
|
||||
function(value, df, options, doc) {
|
||||
if(value) {
|
||||
const escaped_name = encodeURIComponent(value);
|
||||
return repl('<a class="indicator %(color)s" href="#Form/%(doctype)s/%(name)s">%(label)s</a>', {
|
||||
color: get_color(doc || {}),
|
||||
doctype: df.options,
|
||||
name: value,
|
||||
name: escaped_name,
|
||||
label: get_text ? get_text(doc) : value
|
||||
});
|
||||
} else {
|
||||
|
|
@ -516,4 +517,4 @@ _f.Frm.prototype.get_sum = function(table_fieldname, fieldname) {
|
|||
sum += d[fieldname];
|
||||
}
|
||||
return sum;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue