Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

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

sahil839f6d8204d23b4
diff --git a/static/js/dialog_widget.js b/static/js/dialog_widget.js
index 1d00fe0850f..20599d55b50 100644
--- a/static/js/dialog_widget.js
+++ b/static/js/dialog_widget.js
@@ -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 = [
diff --git a/static/templates/dialog_widget.hbs b/static/templates/dialog_widget.hbs
index f95bc90da20..7d816559cf2 100644
--- a/static/templates/dialog_widget.hbs
+++ b/static/templates/dialog_widget.hbs
@@ -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>