dialog_widget: Add support for rendering a single footer button.

This commit is contained in:
Ganesh Pawar
2021-07-18 17:50:59 +05:30
committed by Tim Abbott
parent c429c5d70e
commit 14b07669cc
2 changed files with 5 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ export function launch(conf) {
// * 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.
// * single_footer_button: If true, don't include the "Cancel" button.
for (const f of mandatory_fields) {
if (conf[f] === undefined) {
@@ -99,6 +100,7 @@ export function launch(conf) {
html_submit_button,
html_body: conf.html_body,
id: conf.id,
single_footer_button: conf.single_footer_button,
});
const dialog = $(html);
$("body").append(dialog);