Release of v5.1.1-alpha3

Add edit and create options to the ModalSelect Field (in Joomla 5).
This commit is contained in:
2025-03-30 19:52:28 +00:00
parent 8342c5bb9f
commit b9f38943aa
129 changed files with 3866 additions and 85 deletions

View File

@ -283,6 +283,15 @@ class LibraryController 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;
}
@ -365,6 +374,15 @@ class LibraryController 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('library.id', '');
$return = 'index.php?option=' . $this->option . '&view=' . $this->view_item . $this->getRedirectToItemAppend($id)
. '&layout=modalreturn&from-task=save';
$this->setRedirect(Route::_($return, false));
}
// linked tables to update
$_tables_array = [
'library_config' => 'library',