Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
dialog_widget: Use `_html` variables in template.
apoorvapendse370e6765f896
diff --git a/web/src/dialog_widget.ts b/web/src/dialog_widget.tsindex cc388a0f5ff..ee543329875 100644--- a/web/src/dialog_widget.ts+++ b/web/src/dialog_widget.ts@@ -194,16 +194,16 @@ export function launch(conf: DialogWidgetConfig): string {widget_id_counter += 1;const modal_unique_id = current_dialog_widget_id();- const html_submit_button = conf.html_submit_button ?? $t_html({defaultMessage: "Save changes"});- const html_exit_button = conf.html_exit_button ?? $t_html({defaultMessage: "Cancel"});+ const submit_button_html = conf.html_submit_button ?? $t_html({defaultMessage: "Save changes"});+ const exit_button_html = conf.html_exit_button ?? $t_html({defaultMessage: "Cancel"});const html = render_dialog_widget({modal_unique_id,- html_heading: conf.html_heading,+ heading_html: conf.html_heading,text_heading: conf.text_heading,link: conf.help_link,- html_submit_button,- html_exit_button,- html_body: conf.html_body,+ submit_button_html,+ exit_button_html,+ body_html: conf.html_body,id: conf.id,single_footer_button: conf.single_footer_button,always_visible_scrollbar: conf.always_visible_scrollbar,diff --git a/web/templates/dialog_widget.hbs b/web/templates/dialog_widget.hbsindex c4f8c178aef..6d5c4041f84 100644--- a/web/templates/dialog_widget.hbs+++ b/web/templates/dialog_widget.hbs@@ -3,8 +3,8 @@<div {{#if id}}id="{{id}}" {{/if}}class="modal__container" role="dialog" aria-modal="true" aria-labelledby="dialog_title"><header class="modal__header"><h1 class="modal__title dialog_heading">- {{#if html_heading}}- {{{ html_heading }}}+ {{#if heading_html}}+ {{{ heading_html }}}{{else}}{{ text_heading }}{{/if}}@@ -16,18 +16,18 @@</header><main class="modal__content" data-simplebar data-simplebar-tab-index="-1" {{#if always_visible_scrollbar}}data-simplebar-auto-hide="false"{{/if}}><div class="alert" id="dialog_error"></div>- {{{ html_body }}}+ {{{ body_html }}}</main><footer class="modal__footer">{{#if footer_minor_text }}<div class="dialog-widget-footer-minor-text">{{footer_minor_text}}</div>{{/if}}{{#unless single_footer_button}}- <button class="modal__button dialog_exit_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{{ html_exit_button }}}</button>+ <button class="modal__button dialog_exit_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{{ exit_button_html }}}</button>{{/unless}}<div class="dialog_submit_button_container"><button class="modal__button dialog_submit_button"{{#if single_footer_button}} aria-label="{{t 'Close this dialog window' }}" data-micromodal-close{{/if}}>- <span class="submit-button-text">{{{ html_submit_button }}}</span>+ <span class="submit-button-text">{{{ submit_button_html }}}</span><div class="modal__spinner"></div></button></div>