dialog_widget: Remove is_confirm_dialog variable.

Making the controls declarative makes the system more flexible for
future use cases.
This commit is contained in:
Tim Abbott
2021-07-14 13:07:03 -07:00
parent fd55df9f7c
commit 6fb0d414b4
3 changed files with 26 additions and 13 deletions

View File

@@ -1,10 +1,13 @@
import {$t_html} from "./i18n";
import * as dialog_widget from "./dialog_widget";
import {$t_html} from "./i18n";
export function launch(conf) {
dialog_widget.launch(
{...conf,
html_submit_button: $t_html({defaultMessage: "Confirm"}),
is_confirm_dialog: true,
});
dialog_widget.launch({
...conf,
close_on_submit: true,
danger_submit_button: true,
focus_submit_on_open: true,
html_submit_button: $t_html({defaultMessage: "Confirm"}),
// Used to control button colors in the template.
});
}