Hello All!
I am trying to create a modal dialog (https://docs.espocrm.com/development/modal/#modal-form) that based on the selected option it will open other dialogs for the user to do different actions (like planning a call/meeting/task)
The user should not be able to close the view using the Escape Key or by pressing outside of the window.
Properties added to the modal dialog works correctly
But when I do the same in a 'quickcreate' view it doesn't work, properties are not applied.
If I use a custom view for the 'quickCreate'
"noCloseButton: true" and "fullFormDisabled: true" will work, but "escapeDisabled: true" and "backdrop: 'static'" will not work.
Is there any way to use these 2 properties in a 'quickCreate' view?
I am trying to create a modal dialog (https://docs.espocrm.com/development/modal/#modal-form) that based on the selected option it will open other dialogs for the user to do different actions (like planning a call/meeting/task)
The user should not be able to close the view using the Escape Key or by pressing outside of the window.
Properties added to the modal dialog works correctly
PHP Code:
define('custom:views/modals/lead-update', ['views/modal', 'model'], function(Dep, Model) {
return Dep.extend({
className: 'dialog dialog-record',
templateContent: '<div class="record">{{{record}}}</div>',
escapeDisabled: true,
noCloseButton: true,
backdrop: 'static', // 'static', true, false
But when I do the same in a 'quickcreate' view it doesn't work, properties are not applied.
PHP Code:
actionCreateCall: function () {
var attributes = {};
attributes.parentId = this.options.id;
attributes.parentType = this.options.entityType;
attributes.parentName = this.options.title;
attributes.name = "Recall" + " " + this.options.title;
Espo.Ui.notify(' ... ');
var viewName = this.getMetadata().get('clientDefs.Call.modalViews.edit') || 'views/modals/edit';
this.createView('quickCreate', viewName, {
scope: 'Call',
noCloseButton: true,
backdrop: 'static',
escapeDisabled: true,
attributes: attributes,
}, (view) => {
view.removeButton('cancel');
view.removeButton('fullForm');
view.render();
view.notify(false);
this.listenToOnce(view, 'after:save', () => {
view.close();
});
this.listenToOnce(view, 'after:relate', () => {
this.actionRefreshData();
});
});
},
PHP Code:
this.createView('quickCreate', 'custom:views/modals/detail-small', {
PHP Code:
define('custom:views/modals/detail-small', ['views/modals/edit'], function (Dep) {
return Dep.extend({
escapeDisabled: true,
noCloseButton: true,
backdrop: 'static',
fullFormDisabled: true,
});
});
Is there any way to use these 2 properties in a 'quickCreate' view?
Comment