Skip to content

Commit a94e98c

Browse files
committed
Release 2025111701
1 parent 2a4eba0 commit a94e98c

File tree

74 files changed

+404
-59454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+404
-59454
lines changed

amd/build/form.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/form.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/form.js

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable */
22
import $ from 'jquery';
3-
import ModalFactory from 'core/modal_factory';
3+
import SaveCancelModal from 'core/modal_save_cancel';
44
import ModalEvents from 'core/modal_events';
55
import Notification from 'core/notification';
66
import {get_strings} from 'core/str';
@@ -67,22 +67,19 @@ export async function loadModal(sender, modaldata = null) {
6767

6868
var response = await xhrRequest(xhrdata);
6969

70-
ModalFactory.create({
70+
const modal = await SaveCancelModal.create({
7171
// body gets set in updateModal()
72+
title: response.modal_title,
7273
body: '', // response.form,
7374
large: true,
75+
show: true,
7476
removeOnClose: true,
75-
title: response.modal_title,
76-
type: ModalFactory.types.SAVE_CANCEL,
77-
}).then(function (modal) {
78-
updateModal(modaldata, modal, response, $pane);
79-
modal.show();
80-
modal.getRoot().on(ModalEvents.save, (e) => {
81-
e.preventDefault();
82-
send(modaldata, modal, $pane);
83-
});
77+
});
8478

85-
// TODO: on cancel remove modal?!?
79+
updateModal(modaldata, modal, response, $pane);
80+
modal.getRoot().on(ModalEvents.save, (e) => {
81+
e.preventDefault();
82+
modalSave(modaldata, modal, $pane);
8683
});
8784
}
8885

@@ -163,7 +160,7 @@ function updateModal(modaldata, modal, response, $pane) {
163160
*
164161
*
165162
*/
166-
async function send(modaldata, modal, $pane) {
163+
async function modalSave(modaldata, modal, $pane) {
167164
let form = $(modal.getRoot()).find('form');
168165

169166
const xhrdata = {

0 commit comments

Comments
 (0)