diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 9ee4e4f1e..3f334263d 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -204,9 +204,9 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay $oBlock->Display($oPage, -1); } - function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '') + function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array()) { - $aFieldsMap = $this->GetBareProperties($oPage, $bEditMode, $sPrefix); + $aFieldsMap = $this->GetBareProperties($oPage, $bEditMode, $sPrefix, $aExtraParams); // Special case to display the case log, if any... // WARNING: if you modify the loop below, also check the corresponding code in UpdateObject and DisplayModifyForm @@ -384,7 +384,7 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay } } - function GetBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix) + function GetBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix, $aExtraParams = array()) { $sHtml = ''; $oAppContext = new ApplicationContext(); @@ -399,6 +399,9 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay $aDetails = array(); $iInputId = 0; $aFieldsMap = array(); + $aFieldsComments = (isset($aExtraParams['fieldsComments'])) ? $aExtraParams['fieldsComments'] : array(); + $bFieldComments = (count($aFieldsComments) > 0); + foreach($aDetailsStruct as $sTab => $aCols ) { $aDetails[$sTab] = array(); @@ -1772,7 +1775,7 @@ EOF $oPage->SetCurrentTabContainer(OBJECT_PROPERTIES_TAB); $oPage->SetCurrentTab(Dict::S('UI:PropertiesTab')); - $aFieldsMap = $this->DisplayBareProperties($oPage, true, $sPrefix); + $aFieldsMap = $this->DisplayBareProperties($oPage, true, $sPrefix, $aExtraParams); // Now display the relations, one tab per relation if (!isset($aExtraParams['noRelations'])) { diff --git a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php index 19cb7ae3a..ee60b053e 100644 --- a/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php +++ b/modules/itop-config-mgmt-1.0.0/model.itop-config-mgmt.php @@ -357,7 +357,7 @@ class FileDoc extends Document * Overload the display of the properties to add a tab (the first one) * with the preview of the document */ - public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '') + public function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $sPrefix = '', $aExtraParams = array()) { if (!$bEditMode) { diff --git a/pages/UI.php b/pages/UI.php index 24deeecda..40f360e74 100644 --- a/pages/UI.php +++ b/pages/UI.php @@ -985,7 +985,7 @@ EOF $sClass = utils::ReadParam('class', '', false, 'class'); $bPreview = utils::ReadParam('preview_mode', ''); - $sSelectedObj = utils::ReadParam('selectObj', ''); + $sSelectedObj = utils::ReadParam('selectObj', '', false, 'raw_data'); if ( empty($sClass) || empty($sSelectedObj)) // TO DO: check that the class name is valid ! { throw new ApplicationException(Dict::Format('UI:Error:2ParametersMissing', 'class', 'selectObj')); @@ -1582,9 +1582,9 @@ EOF } } $sButtonsPosition = MetaModel::GetConfig()->Get('buttons_position'); - if ($sButtonsPosition != 'bottom') + if ($sButtonsPosition == 'bottom') { - // top or both: Displays the ticket details BEFORE the actions + // bottom: Displays the ticket details BEFORE the actions $oP->add('
'); $oObj->DisplayBareProperties($oP); $oP->add('
'); @@ -1608,9 +1608,9 @@ EOF $oP->add("\n"); $oP->add("\n"); $oP->add("\n"); - if ($sButtonsPosition == 'bottom') + if ($sButtonsPosition != 'bottom') { - // bottom or both: Displays the ticket details AFTER the actions + // top or both: Displays the ticket details AFTER the actions $oP->add('
'); $oObj->DisplayBareProperties($oP); $oP->add('
'); @@ -1638,10 +1638,10 @@ EOF case 'bulk_apply_stimulus': $bPreviewMode = utils::ReadPostedParam('preview_mode', false); - $sFilter = utils::ReadPostedParam('filter', ''); + $sFilter = utils::ReadPostedParam('filter', '', false, 'raw_data'); $sStimulus = utils::ReadPostedParam('stimulus', ''); $sState = utils::ReadPostedParam('state', ''); - $sSelectObject = utils::ReadPostedParam('selectObject', ''); + $sSelectObject = utils::ReadPostedParam('selectObject', '', false, 'raw_data'); $aSelectObject = explode(',', $sSelectObject); if (empty($sFilter) || empty($sStimulus) || empty($sState)) diff --git a/synchro/synchrodatasource.class.inc.php b/synchro/synchrodatasource.class.inc.php index ee1c0510a..619ac841e 100644 --- a/synchro/synchrodatasource.class.inc.php +++ b/synchro/synchrodatasource.class.inc.php @@ -2053,7 +2053,7 @@ class SynchroReplica extends DBObject implements iDisplay $this->DisplayBareProperties($oPage, $bEditMode); } - function DisplayBareProperties(WebPage $oPage, $bEditMode = false) + function DisplayBareProperties(WebPage $oPage, $bEditMode = false, $aExtraParams = array()) { if ($bEditMode) return; // Not editable