diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php
index b81fa21d3..82524ea29 100644
--- a/application/cmdbabstract.class.inc.php
+++ b/application/cmdbabstract.class.inc.php
@@ -2804,7 +2804,7 @@ $('.state_select_{$this->m_iFormId}').change( function() {
}
});
JAVASCRIPT
- );
+ );
}
}
@@ -2847,6 +2847,18 @@ EOF
$oPage->p($sStatesSelection);
$aFieldsMap = $this->DisplayBareProperties($oPage, true, $sPrefix, $aExtraParams);
+ //if we are in bulk modify : 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
+ if (isset($aExtraParams['nbBulkObj'])) {
+ foreach (MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode => $oAttDef) {
+ if ($oAttDef instanceof AttributeCaseLog) {
+ $sComment = (isset($aExtraParams['fieldsComments'][$sAttCode])) ? $aExtraParams['fieldsComments'][$sAttCode] : '';
+ $this->DisplayCaseLogForBulkModify($oPage, $sAttCode, $sComment, $sPrefix);
+ $aFieldsMap[$sAttCode] = $this->m_iFormId.'_'.$sAttCode;
+ }
+ }
+ }
+
if (!is_array($aFieldsMap)) {
$aFieldsMap = array();
}
@@ -4507,6 +4519,72 @@ HTML
}
}
+ /**
+ * Special display where the case log uses the whole "screen" at the bottom of the "Properties" tab
+ *
+ * @param \WebPage $oPage
+ * @param string $sAttCode
+ * @param string $sComment
+ * @param string $sPrefix
+ *
+ * @throws \ArchivedObjectException
+ * @throws \CoreException
+ * @throws \CoreUnexpectedValue
+ * @throws \DictExceptionMissingString
+ * @throws \MySQLException
+ * @throws \OQLException
+ * @throws \Exception
+ */
+ public function DisplayCaseLogForBulkModify(WebPage $oPage, $sAttCode, $sComment = '', $sPrefix = '')
+ {
+ $sClass = get_class($this);
+
+ $iFlags = $this->GetAttributeFlags($sAttCode);
+
+ if ($iFlags & (OPT_ATT_HIDDEN | OPT_ATT_READONLY | OPT_ATT_SLAVE)) {
+ // The case log can not be updated
+ } else {
+ $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
+ $sAttDefClass = get_class($oAttDef);
+ $sAttLabel = $oAttDef->GetLabel();
+ $sAttMetaDataLabel = utils::HtmlEntities($sAttLabel);
+ $sAttMetaDataFlagMandatory = (($iFlags & OPT_ATT_MANDATORY) === OPT_ATT_MANDATORY) ? 'true' : 'false';
+ $sAttMetaDataFlagMustChange = (($iFlags & OPT_ATT_MUSTCHANGE) === OPT_ATT_MUSTCHANGE) ? 'true' : 'false';
+ $sAttMetaDataFlagMustPrompt = (($iFlags & OPT_ATT_MUSTPROMPT) === OPT_ATT_MUSTPROMPT) ? 'true' : 'false';
+
+ $sInputId = $this->m_iFormId.'_'.$sAttCode;
+
+ $sValue = $this->Get($sAttCode);
+ $sDisplayValue = $this->GetEditValue($sAttCode);
+ $aArgs = array('this' => $this, 'formPrefix' => $sPrefix);
+
+ $sCommentAsHtml = ($sComment != '') ? ''.$sComment.'
' : '';
+ $sFieldAsHtml = self::GetFormElementForField($oPage, $sClass, $sAttCode, $oAttDef, $sValue, $sDisplayValue, $sInputId, '', $iFlags, $aArgs);
+ $sHTMLValue = <<
+