DEV: Update icon structure in bootbox buttons (#11925)
This commit is contained in:
parent
75d766499f
commit
2ee63a6a83
|
@ -315,9 +315,8 @@ export default Controller.extend(CanCheckEmails, {
|
||||||
link: true,
|
link: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:
|
icon: iconHTML("exclamation-triangle"),
|
||||||
`${iconHTML("exclamation-triangle")} ` +
|
label: I18n.t("admin.user.delete_all_posts"),
|
||||||
I18n.t("admin.user.delete_all_posts"),
|
|
||||||
class: "btn btn-danger",
|
class: "btn btn-danger",
|
||||||
callback: () => {
|
callback: () => {
|
||||||
const progressModal = openProgressModal();
|
const progressModal = openProgressModal();
|
||||||
|
@ -367,10 +366,9 @@ export default Controller.extend(CanCheckEmails, {
|
||||||
link: true,
|
link: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:
|
label: I18n.t("admin.user.anonymize_yes"),
|
||||||
`${iconHTML("exclamation-triangle")} ` +
|
|
||||||
I18n.t("admin.user.anonymize_yes"),
|
|
||||||
class: "btn btn-danger",
|
class: "btn btn-danger",
|
||||||
|
icon: iconHTML("exclamation-triangle"),
|
||||||
callback: () => {
|
callback: () => {
|
||||||
performAnonymize();
|
performAnonymize();
|
||||||
},
|
},
|
||||||
|
@ -435,9 +433,8 @@ export default Controller.extend(CanCheckEmails, {
|
||||||
link: true,
|
link: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label:
|
icon: iconHTML("exclamation-triangle"),
|
||||||
`${iconHTML("exclamation-triangle")} ` +
|
label: I18n.t("admin.user.delete_and_block"),
|
||||||
I18n.t("admin.user.delete_and_block"),
|
|
||||||
class: "btn btn-danger",
|
class: "btn btn-danger",
|
||||||
callback: () => {
|
callback: () => {
|
||||||
performDestroy(true);
|
performDestroy(true);
|
||||||
|
|
|
@ -131,7 +131,8 @@ export default Controller.extend(CanCheckEmails, {
|
||||||
link: true,
|
link: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: `${iconHTML("ban")}${I18n.t("user.second_factor.disable")}`,
|
icon: iconHTML("ban"),
|
||||||
|
label: I18n.t("user.second_factor.disable"),
|
||||||
class: "btn-danger btn-icon-text",
|
class: "btn-danger btn-icon-text",
|
||||||
callback: () => {
|
callback: () => {
|
||||||
this.model
|
this.model
|
||||||
|
|
|
@ -340,7 +340,7 @@ var bootbox = window.bootbox || (function(document, $) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handlers[i]['icon']) {
|
if (handlers[i]['icon']) {
|
||||||
icon = "<i class='"+handlers[i]['icon']+"'></i> ";
|
icon = handlers[i]['icon'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handlers[i]['href']) {
|
if (handlers[i]['href']) {
|
||||||
|
@ -350,7 +350,7 @@ var bootbox = window.bootbox || (function(document, $) {
|
||||||
href = _defaultHref;
|
href = _defaultHref;
|
||||||
}
|
}
|
||||||
|
|
||||||
buttons = buttons + "<a data-handler='"+i+"' class='"+_class+"' href='" + href + "'>"+icon+""+label+"</a>";
|
buttons = buttons + "<a data-handler='"+i+"' class='"+_class+"' href='" + href + "'>"+icon+"<span class='d-button-label'>"+label+"</span></a>";
|
||||||
|
|
||||||
callbacks[i] = callback;
|
callbacks[i] = callback;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue