mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
UIBlock: Change $aAdditionalCSSClasses methods to match app. conventions (parameters should be arrays, not space separated string)
Note: This had to be fixed on all calls to this, hence the number of modifications.
This commit is contained in:
@@ -180,11 +180,15 @@ class SearchForm
|
||||
|
||||
|
||||
$sAction = (isset($aExtraParams['action'])) ? $aExtraParams['action'] : utils::GetAbsoluteUrlAppRoot().'pages/UI.php';
|
||||
$sStyle = "ibo-search-form";
|
||||
$sStyle .= ($bOpen == 'true') ? '' : ' closed';
|
||||
$sStyle .= ($bAutoSubmit === true) ? '' : ' no_auto_submit';
|
||||
$aCSSClasses = ["ibo-search-form"];
|
||||
if ($bOpen == 'true') {
|
||||
$aCSSClasses[] = 'closed';
|
||||
}
|
||||
if ($bAutoSubmit === true) {
|
||||
$aCSSClasses[] = 'no_auto_submit';
|
||||
}
|
||||
$oUiSearchBlock = new Panel(Dict::Format('UI:SearchFor_Class_Objects', $sClassesCombo), [],Panel::ENUM_COLOR_CYAN, $sSearchFormId);
|
||||
$oUiSearchBlock->SetCSSClasses("ibo-search-form-panel display_block");
|
||||
$oUiSearchBlock->SetCSSClasses(["ibo-search-form-panel", "display_block"]);
|
||||
$oUiBlock->AddSubBlock($oUiSearchBlock);
|
||||
$sHtml = "<a class=\"sft_toggler fas fa-caret-down pull-right\" href=\"#\" title=\"" . Dict::S('UI:Search:Toggle') . "\"></a>";
|
||||
if (!$bShowObsoleteData)
|
||||
@@ -203,12 +207,12 @@ class SearchForm
|
||||
|
||||
$oFormSearch = new Form("fs_".$sSearchFormId);
|
||||
$oFormSearch->SetAction($sAction)
|
||||
->AddCSSClasses($sStyle);
|
||||
->AddCSSClasses($aCSSClasses);
|
||||
$oUiSearchBlock->AddSubBlock($oFormSearch);
|
||||
$oFormSearch->AddSubBlock(InputUIBlockFactory::MakeForHidden("class", $sClassName));
|
||||
$oFormSearch->AddHtml("<div id=\"fs_{$sSearchFormId}_message\" class=\"sf_message header_message\"></div>");//class sf_message header_message
|
||||
|
||||
$oCriterionBlock = new UIContentBlock("fs_{$sSearchFormId}_criterion_outer", "sf_criterion_area ibo-criterion-area");
|
||||
$oCriterionBlock = new UIContentBlock("fs_{$sSearchFormId}_criterion_outer", ["sf_criterion_area ibo-criterion-area"]);
|
||||
$oFormSearch->AddSubBlock($oCriterionBlock);
|
||||
|
||||
if (isset($aExtraParams['query_params'])) {
|
||||
|
||||
Reference in New Issue
Block a user