Improve RelationController evalManageTitle()
Improves the evalManageTitle() method of the RelationController by making it possible to detect being the create manage form, which will enable us to utilize the results of the evalManageTitle in the manage_form partial.
This commit is contained in:
parent
38b6c51381
commit
102831ecc2
|
|
@ -326,14 +326,14 @@ class RelationController extends ControllerBehavior
|
|||
$this->relationObject = $this->model->{$field}();
|
||||
$this->relationModel = $this->relationObject->getRelated();
|
||||
|
||||
$this->manageId = post('manage_id');
|
||||
$this->foreignId = post('foreign_id');
|
||||
$this->readOnly = $this->getConfig('readOnly');
|
||||
$this->deferredBinding = $this->getConfig('deferredBinding') || !$this->model->exists;
|
||||
$this->toolbarButtons = $this->evalToolbarButtons();
|
||||
$this->viewMode = $this->evalViewMode();
|
||||
$this->manageMode = $this->evalManageMode();
|
||||
$this->manageTitle = $this->evalManageTitle();
|
||||
$this->manageId = post('manage_id');
|
||||
$this->foreignId = post('foreign_id');
|
||||
|
||||
/*
|
||||
* Toolbar widget
|
||||
|
|
@ -1435,9 +1435,12 @@ class RelationController extends ControllerBehavior
|
|||
if ($this->readOnly) {
|
||||
return 'backend::lang.relation.preview_name';
|
||||
}
|
||||
else {
|
||||
elseif ($this->manageId) {
|
||||
return 'backend::lang.relation.update_name';
|
||||
}
|
||||
else {
|
||||
return 'backend::lang.relation.create_name';
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue