From c429c5d70ed17fec4fb9cf48294125d3cf451af4 Mon Sep 17 00:00:00 2001 From: Ganesh Pawar Date: Wed, 21 Jul 2021 17:13:29 +0530 Subject: [PATCH] dialog_widget: Add support for having a custom id on the container element. --- static/js/dialog_widget.js | 2 ++ static/templates/dialog_widget.hbs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/static/js/dialog_widget.js b/static/js/dialog_widget.js index 36c23d0caa..41ea56ee93 100644 --- a/static/js/dialog_widget.js +++ b/static/js/dialog_widget.js @@ -78,6 +78,7 @@ export function launch(conf) { // * close_on_submit: Whether to close modal on clicking submit. // * focus_submit_on_open: Whether to focus submit button on open. // * help_link: A help link in the heading area. + // * id: Custom id to the container element to modify styles. for (const f of mandatory_fields) { if (conf[f] === undefined) { @@ -97,6 +98,7 @@ export function launch(conf) { link: conf.help_link, html_submit_button, html_body: conf.html_body, + id: conf.id, }); const dialog = $(html); $("body").append(dialog); diff --git a/static/templates/dialog_widget.hbs b/static/templates/dialog_widget.hbs index ce403431e8..a848c945bc 100644 --- a/static/templates/dialog_widget.hbs +++ b/static/templates/dialog_widget.hbs @@ -1,6 +1,6 @@