diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 338af8241..c0b814d3b 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -1050,15 +1050,12 @@ HTML $sClass = get_class($this); $iKey = $this->GetKey(); - if ($sMode === static::ENUM_OBJECT_MODE_VIEW) - { + if ($sMode === static::ENUM_OBJECT_MODE_VIEW) { // The concurrent access lock makes sense only for already existing objects $LockEnabled = MetaModel::GetConfig()->Get('concurrent_lock_enabled'); - if ($LockEnabled) - { + if ($LockEnabled) { $aLockInfo = iTopOwnershipLock::IsLocked($sClass, $iKey); - if ($aLockInfo['locked'] === true && $aLockInfo['owner']->GetKey() == UserRights::GetUserId() && $bBlockReentrance === false) - { + if ($aLockInfo['locked'] === true && $aLockInfo['owner']->GetKey() == UserRights::GetUserId() && $bBlockReentrance === false) { // If the object is locked by the current user, it's worth trying again, since // the lock may be released by 'onunload' which is called AFTER loading the current page. //$bTryAgain = $oOwner->GetKey() == UserRights::GetUserId(); @@ -1072,6 +1069,9 @@ HTML // Object's details $oObjectDetails = ObjectFactory::MakeDetails($this); + if ($oPage->IsPrintableVersion()) { + $oObjectDetails->SetIsHeaderVisibleOnScroll(false); + } // Note: DisplayBareHeader is called before adding $oObjectDetails to the page, so it can inject HTML before it through $oPage. /** @var \iTopWebPage $oPage */ @@ -2057,10 +2057,8 @@ HTML; $sHours = ""; $sMinutes = ""; $sSeconds = ""; - $sHidden = ""; - $sHTMLValue = Dict::Format('UI:DurationForm_Days_Hours_Minutes_Seconds', $sDays, $sHours, $sMinutes, - $sSeconds).$sHidden." ".$sValidationSpan.$sReloadSpan; + $sHidden = ""; + $sHTMLValue = Dict::Format('UI:DurationForm_Days_Hours_Minutes_Seconds', $sDays, $sHours, $sMinutes, $sSeconds).$sHidden." ".$sValidationSpan.$sReloadSpan; $oPage->add_ready_script("$('#{$iId}').on('update', function(evt, sFormId) { return ToggleDurationField('$iId'); });"); break; @@ -4699,7 +4697,9 @@ HTML $aFieldsMap[$sAttCode] = $sInputId; - $oFieldset = FieldSetUIBlockFactory::MakeStandard($sAttLabel); + $sCommentAsHtml = ($sComment != '') ? '