fix: [js:bootstrap-helper] Make sure button exists
parent
008c674f4d
commit
8f1a17142b
|
@ -48,6 +48,7 @@ class UIFactory {
|
||||||
/**
|
/**
|
||||||
* Creates and displays a modal where the modal's content is fetched from the provided URL. Reloads the table after a successful operation and handles displayOnSuccess option
|
* Creates and displays a modal where the modal's content is fetched from the provided URL. Reloads the table after a successful operation and handles displayOnSuccess option
|
||||||
* @param {string} url - The URL from which the modal's content should be fetched
|
* @param {string} url - The URL from which the modal's content should be fetched
|
||||||
|
* @param {string} reloadUrl - The URL from which the data should be fetched after confirming
|
||||||
* @param {string} tableId - The table ID which should be reloaded on success
|
* @param {string} tableId - The table ID which should be reloaded on success
|
||||||
* @return {Promise<Object>} Promise object resolving to the ModalFactory object
|
* @return {Promise<Object>} Promise object resolving to the ModalFactory object
|
||||||
*/
|
*/
|
||||||
|
@ -588,6 +589,7 @@ class ModalFactory {
|
||||||
/** Attach the submission click listener for modals that have been generated by raw HTML */
|
/** Attach the submission click listener for modals that have been generated by raw HTML */
|
||||||
findSubmitButtonAndAddListener(clearOnclick=true) {
|
findSubmitButtonAndAddListener(clearOnclick=true) {
|
||||||
const $submitButton = this.$modal.find('.modal-footer #submitButton')
|
const $submitButton = this.$modal.find('.modal-footer #submitButton')
|
||||||
|
if ($submitButton[0]) {
|
||||||
const formID = $submitButton.data('form-id')
|
const formID = $submitButton.data('form-id')
|
||||||
let $form
|
let $form
|
||||||
if (formID) {
|
if (formID) {
|
||||||
|
@ -617,6 +619,7 @@ class ModalFactory {
|
||||||
$submitButton.click(this.getConfirmationHandlerFunction())
|
$submitButton.click(this.getConfirmationHandlerFunction())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Class representing an loading overlay */
|
/** Class representing an loading overlay */
|
||||||
class OverlayFactory {
|
class OverlayFactory {
|
||||||
|
|
Loading…
Reference in New Issue