mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-22 10:08:45 +02:00
Add UIBlocks to twig
This commit is contained in:
@@ -329,20 +329,20 @@ JS
|
||||
$oTabsBlock = new Panel(Dict::S('UI:Tabs:Preferences'), array(), 'grey', 'ibo-tabs');
|
||||
|
||||
$oTabsForm = new Form();
|
||||
$oTabsForm->AddSubBlock(InputFactory::MakeForHidden('operation', 'apply_tab_config'));
|
||||
$oTabsForm->AddSubBlock(InputUIBlockFactory::MakeForHidden('operation', 'apply_tab_config'));
|
||||
|
||||
$sTabsScrollableValue = appUserPreferences::GetPref('tab_scrollable', false);;
|
||||
$oTabsScrollable = InputFactory::MakeForSelectWithLabel('tab_scrollable', Dict::S('UI:Tabs:Scrollable:Label'));
|
||||
$oTabsScrollable->GetInput()->AddOption(InputFactory::MakeForSelectOption('true', Dict::S('UI:Tabs:Scrollable:Scrollable'), true === $sTabsScrollableValue));
|
||||
$oTabsScrollable->GetInput()->AddOption(InputFactory::MakeForSelectOption('false', Dict::S('UI:Tabs:Scrollable:Classic'), false === $sTabsScrollableValue));
|
||||
$oTabsScrollable = InputUIBlockFactory::MakeForSelectWithLabel('tab_scrollable', Dict::S('UI:Tabs:Scrollable:Label'));
|
||||
$oTabsScrollable->GetInput()->AddOption(InputUIBlockFactory::MakeForSelectOption('true', Dict::S('UI:Tabs:Scrollable:Scrollable'), true === $sTabsScrollableValue));
|
||||
$oTabsScrollable->GetInput()->AddOption(InputUIBlockFactory::MakeForSelectOption('false', Dict::S('UI:Tabs:Scrollable:Classic'), false === $sTabsScrollableValue));
|
||||
$oTabsForm->AddSubBlock($oTabsScrollable);
|
||||
|
||||
// - Cancel button
|
||||
$oTabsCancelButton = ButtonFactory::MakeForSecondaryAction(Dict::S('UI:Button:Cancel'));
|
||||
$oTabsCancelButton = ButtonUIBlockFactory::MakeForSecondaryAction(Dict::S('UI:Button:Cancel'));
|
||||
$oTabsCancelButton->SetOnClickJsCode("window.location.href = '$sURL'");
|
||||
$oTabsForm->AddSubBlock($oTabsCancelButton);
|
||||
// - Submit button
|
||||
$oTabsSubmitButton = ButtonFactory::MakeForPrimaryAction(Dict::S('UI:Button:Apply'), null, null, true);
|
||||
$oTabsSubmitButton = ButtonUIBlockFactory::MakeForPrimaryAction(Dict::S('UI:Button:Apply'), null, null, true);
|
||||
$oTabsForm->AddSubBlock($oTabsSubmitButton);
|
||||
|
||||
$oTabsBlock->AddSubBlock($oTabsForm);
|
||||
|
||||
@@ -208,7 +208,7 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
$oQuerySubmit = ButtonFactory::MakeForPrimaryAction(
|
||||
$oQuerySubmit = ButtonUIBlockFactory::MakeForPrimaryAction(
|
||||
Dict::S('UI:Button:Evaluate'),
|
||||
null,
|
||||
null,
|
||||
@@ -323,7 +323,7 @@ EOF
|
||||
$oSyntaxErrorPanel->AddSubBlock(new Html($sSyntaxErrorText));
|
||||
|
||||
$sEscapedExpression = utils::EscapeHtml(addslashes($sFixedExpression));
|
||||
$oUseSuggestedQueryButton = ButtonFactory::MakeForDestructiveAction('Use this query');
|
||||
$oUseSuggestedQueryButton = ButtonUIBlockFactory::MakeForDestructiveAction('Use this query');
|
||||
$oUseSuggestedQueryButton->SetOnClickJsCode(<<<JS
|
||||
let \$oQueryTextarea = $('textarea[name=expression]');
|
||||
\$oQueryTextarea.val('$sEscapedExpression').focus();
|
||||
|
||||
Reference in New Issue
Block a user