this._options = Core.extend({
actionParameters: {},
destroyOnClose: false,
- usesDboAction: this._className.match(/\w+\\data\\/),
+ usesDboAction: new RegExp(/\w+\\data\\/).test(this._className),
}, options);
this._options.dialog = Core.extend(this._options.dialog || {}, {
onClose: this._dialogOnClose.bind(this),
}
this._additionalSubmitButtons = Array.from(dialogData.content.querySelectorAll(':not(.formSubmit) button[type="submit"]'));
this._additionalSubmitButtons.forEach((submit) => {
- submit.addEventListener("click", (ev) => {
+ submit.addEventListener("click", () => {
// Mark the button that was clicked so that the button data handlers know
// which data needs to be submitted.
this._additionalSubmitButtons.forEach((button) => {
import * as Core from "../../Core";
import UiDialog from "../../Ui/Dialog";
-import { DialogCallbackObject, DialogCallbackSetup, DialogData, DialogOptions } from "../../Ui/Dialog/Data";
+import { DialogCallbackObject, DialogCallbackSetup, DialogData } from "../../Ui/Dialog/Data";
import * as Ajax from "../../Ajax";
import { AjaxCallbackObject, AjaxCallbackSetup, DatabaseObjectActionResponse, RequestOptions } from "../../Ajax/Data";
import FormBuilderManager from "./Manager";
{
actionParameters: {},
destroyOnClose: false,
- usesDboAction: this._className.match(/\w+\\data\\/),
+ usesDboAction: new RegExp(/\w+\\data\\/).test(this._className),
},
options,
) as FormBuilderDialogOptions;
dialogData.content.querySelectorAll(':not(.formSubmit) button[type="submit"]'),
);
this._additionalSubmitButtons.forEach((submit) => {
- submit.addEventListener("click", (ev) => {
+ submit.addEventListener("click", () => {
// Mark the button that was clicked so that the button data handlers know
// which data needs to be submitted.
this._additionalSubmitButtons.forEach((button) => {
/**
* Destroys the dialog form.
*/
- public destroy(ignoreDialog: boolean = false): void {
+ public destroy(ignoreDialog = false): void {
if (this._formId !== "") {
if (FormBuilderManager.hasForm(this._formId)) {
FormBuilderManager.unregisterForm(this._formId);
/**
* Opens the dialog form.
*/
- public open() {
+ public open(): void {
if (UiDialog.getDialog(this._dialogId)) {
UiDialog.open(this);
} else {