fullFormUrl option
This commit is contained in:
@@ -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>')
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user