fix: list view restricted button icon

This commit is contained in:
prssanna 2020-12-15 16:24:46 +05:30
parent 241e30ae36
commit 0cf0d8ed80

View file

@ -163,10 +163,13 @@ frappe.views.ListView = class ListView extends frappe.views.BaseList {
show_restricted_list_indicator_if_applicable() {
const match_rules_list = frappe.perm.get_match_rules(this.doctype);
if (match_rules_list.length) {
this.restricted_list = $(`<button class="restricted-button">${__('Restricted')}</button>`)
.prepend('<span class="octicon octicon-lock"></span>')
.click(() => this.show_restrictions(match_rules_list))
.appendTo(this.page.page_form);
this.restricted_list = $(
`<button class="btn btn-default btn-xs restricted-button flex align-center">
${frappe.utils.icon('lock', 'xs')}
</button>`
)
.click(() => this.show_restrictions(match_rules_list))
.appendTo(this.page.page_form);
}
}