diff --git a/client/src/views/modal.js b/client/src/views/modal.js index 7df150b258..fd2c970d15 100644 --- a/client/src/views/modal.js +++ b/client/src/views/modal.js @@ -58,6 +58,7 @@ class ModalView extends View { * @property {string} [className] An additional class name. * @property {string} [title] A title text. * @property {'primary'|'danger'|'success'|'warning'|'text'} [style] A style. + * @property {string} [iconHtml] An icon HTML. */ /** @@ -464,6 +465,10 @@ class ModalView extends View { } } + if (o.iconHtml && !o.html) { + o.html = o.iconHtml + ' ' + this.getHelper().escapeString(o.text); + } + o.onClick = o.onClick || ((d, e) => { const handler = o.handler || (o.data || {}).handler; diff --git a/client/src/views/modals/select-records.js b/client/src/views/modals/select-records.js index 75b6ad8ace..f0c05e2f6c 100644 --- a/client/src/views/modals/select-records.js +++ b/client/src/views/modals/select-records.js @@ -151,6 +151,7 @@ class SelectRecordsModalView extends ModalView { name: 'create', position: 'right', onClick: () => this.create(), + iconHtml: '', label: 'Create', }); }