mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°5904 Hide transitions in modals
This commit is contained in:
@@ -2844,9 +2844,9 @@ JS
|
||||
$oApplyButton = ButtonUIBlockFactory::MakeForPrimaryAction($sApplyButton, null, null, true);
|
||||
$oApplyButton->AddCSSClass('action');
|
||||
$oToolbarButtons->AddSubBlock($oApplyButton);
|
||||
|
||||
$bAreTransitionsHidden = isset($aExtraParams['hide_transitions']) && $aExtraParams['hide_transitions'] === true;
|
||||
$aTransitions = $this->EnumTransitions();
|
||||
if (!isset($aExtraParams['custom_operation']) && count($aTransitions)) {
|
||||
if (!isset($aExtraParams['custom_operation']) && !$bAreTransitionsHidden && count($aTransitions)) {
|
||||
// Transitions are displayed only for the standard new/modify actions, not for modify_all or any other case...
|
||||
$oSetToCheckRights = DBObjectSet::FromObject($this);
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ class ObjectController extends AbstractController
|
||||
$oPage = new AjaxPage('');
|
||||
$aFormExtraParams['js_handlers'] = [];
|
||||
$aFormExtraParams['noRelations'] = true;
|
||||
$aFormExtraParams['hide_transitions'] = true;
|
||||
// We display this form in a modal, once we submit (in ajax) we probably want to only close the modal
|
||||
$aFormExtraParams['js_handlers']['form_on_submit'] =
|
||||
<<<JS
|
||||
|
||||
@@ -124,7 +124,7 @@ class LinkSetController extends AbstractController
|
||||
* @throws \CoreException
|
||||
* @throws \SecurityException
|
||||
*/
|
||||
public function OperationCreateLinkedObject()
|
||||
public function OperationCreateLinkedObject(): AjaxPage
|
||||
{
|
||||
if (!$this->IsHandlingXmlHttpRequest()) {
|
||||
throw new CoreException('LinksetController can only be called in ajax.');
|
||||
@@ -192,6 +192,7 @@ JS
|
||||
;
|
||||
$aExtraParams = [
|
||||
'noRelations' => true,
|
||||
'hide_transitions' => true,
|
||||
'fieldsFlags' => $aFieldFlags,
|
||||
'js_handlers' => [
|
||||
'form_on_submit' => $sFormOnSubmitJsCode,
|
||||
|
||||
Reference in New Issue
Block a user