Release of v5.1.1-alpha3
Add edit and create options to the ModalSelect Field (in Joomla 5).
This commit is contained in:
@ -284,6 +284,15 @@ class Joomla_module_updatesController extends FormController
|
||||
)
|
||||
);
|
||||
}
|
||||
// When editing in modal then redirect to modalreturn layout
|
||||
elseif ($cancel && $this->input->get('layout') === 'modal')
|
||||
{
|
||||
$id = $this->input->get('id');
|
||||
$return = 'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($id)
|
||||
. '&layout=modalreturn&from-task=cancel';
|
||||
|
||||
$this->setRedirect(Route::_($return, false));
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
@ -366,6 +375,15 @@ class Joomla_module_updatesController extends FormController
|
||||
*/
|
||||
protected function postSaveHook(BaseDatabaseModel $model, $validData = [])
|
||||
{
|
||||
if ($this->input->get('layout') === 'modal' && $this->task === 'save')
|
||||
{
|
||||
// When editing in modal then redirect to modalreturn layout
|
||||
$id = $model->getState('joomla_module_updates.id', '');
|
||||
$return = 'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($id)
|
||||
. '&layout=modalreturn&from-task=save';
|
||||
|
||||
$this->setRedirect(Route::_($return, false));
|
||||
}
|
||||
// update the component version to match the updated last version
|
||||
if (isset($validData['joomla_plugin']) && GuidHelper::valid($validData['joomla_plugin']))
|
||||
{
|
||||
|
Reference in New Issue
Block a user