dialog_widget: Color of button should be according to use of modal.

We show red color for confirmation modals and green for other
modals with input fields.

As of this commit, only confirmation modals use dialog_widget but
some other modals with input fields will be migrated to use
dialog_widget.
This commit is contained in:
sahil839
2021-07-06 00:20:41 +05:30
committed by Tim Abbott
parent dff374a48b
commit f6d8204d23
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ export function show_dialog_spinner() {
}
export function launch(conf) {
const html = render_dialog_widget({fade: conf.fade});
const html = render_dialog_widget({fade: conf.fade, is_confirm_dialog: conf.is_confirm_dialog});
const dialog = $(html);
const mandatory_fields = [

View File

@@ -8,7 +8,7 @@
</div>
<div class="modal-footer">
<button class="button rounded close-modal-btn" data-dismiss="modal">{{t "Cancel" }}</button>
<button class="button rounded btn-danger dialog_submit_button">
<button class="button rounded {{#if is_confirm_dialog}}btn-danger{{else}}sea-green{{/if}} dialog_submit_button">
<object class="loader" type="image/svg+xml" data="/static/images/loader.svg"></object>
<span></span>
</button>