fullFormUrl option

This commit is contained in:
Yuri Kuznetsov
2024-10-05 12:48:40 +03:00
parent 36f2c14fda
commit 86abdeb759
2 changed files with 5 additions and 3 deletions
+2 -1
View File
@@ -105,6 +105,7 @@ class DetailModalView extends ModalView {
* @property {boolean} [fullFormDisabled] Disable full-form.
* @property {boolean} [quickEditDisabled] Disable quick edit.
* @property {string} [rootUrl] A root URL.
* @property {string} [fullFormUrl] A full-form URL. As of v8.5.
*/
/**
@@ -357,7 +358,7 @@ class DetailModalView extends ModalView {
}
if (!this.fullFormDisabled) {
const url = '#' + scope + '/view/' + this.id;
const url = this.options.fullFormUrl || `#${scope}/view/${this.id}`;
this.headerHtml =
$('<a>')
+3 -2
View File
@@ -129,6 +129,7 @@ class EditModalView extends ModalView {
* @property {string} [rootUrl] A root URL.
* @property {string} [returnUrl] A return URL.
* @property {Record} [returnDispatchParams] Return dispatch params.
* @property {string} [fullFormUrl] A full-form URL. As of v8.5.
*/
/**
@@ -383,7 +384,7 @@ class EditModalView extends ModalView {
let options;
if (!this.id) {
url = '#' + this.scope + '/create';
url = this.options.fullFormUrl || `#${this.scope}/create`;
attributes = this.getRecordView().fetch();
model = this.getRecordView().model;
@@ -407,7 +408,7 @@ class EditModalView extends ModalView {
}, 10);
}
else {
url = '#' + this.scope + '/edit/' + this.id;
url = this.options.fullFormUrl || `#${this.scope}/edit/${this.id}`;
attributes = this.getRecordView().fetch();
model = this.getRecordView().model;