mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-20 07:42:17 +02:00
N°6935 - Migrate relative images URLs to absolute ones in order to support pages on different depth levels
This commit is contained in:
@@ -55,7 +55,6 @@ class FormHelper
|
||||
*/
|
||||
public static function DisableAttributeBlobInputs(string $sClassName, array &$aExtraParams): void
|
||||
{
|
||||
|
||||
// Initialize extra params array
|
||||
if (!array_key_exists('fieldsFlags', $aExtraParams)) {
|
||||
$aExtraParams['fieldsFlags'] = [];
|
||||
@@ -64,13 +63,13 @@ class FormHelper
|
||||
$aExtraParams['fieldsComments'] = [];
|
||||
}
|
||||
|
||||
// Iterate throw class attributes...
|
||||
// Iterate through class attributes...
|
||||
$sAppRootUrl = utils::GetAbsoluteUrlAppRoot();
|
||||
foreach (MetaModel::ListAttributeDefs($sClassName) as $sAttCode => $oAttDef) {
|
||||
|
||||
// Set attribute blobs in read only
|
||||
if ($oAttDef instanceof AttributeBlob) {
|
||||
$aExtraParams['fieldsFlags'][$sAttCode] = OPT_ATT_READONLY;
|
||||
$aExtraParams['fieldsComments'][$sAttCode] = ' <img src="../images/transp-lock.png" style="vertical-align:middle" title="'.utils::EscapeHtml(Dict::S('UI:UploadNotSupportedInThisMode')).'"/>';
|
||||
$aExtraParams['fieldsComments'][$sAttCode] = ' <img src="' . $sAppRootUrl . 'images/transp-lock.png" style="vertical-align:middle" title="'.utils::EscapeHtml(Dict::S('UI:UploadNotSupportedInThisMode')).'"/>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class ErrorPage extends NiceWebPage
|
||||
if(utils::IsEasterEggAllowed())
|
||||
{
|
||||
$this->add('<div class="message message-valid">'.Dict::S('UI:ErrorPage:UnstableVersion').'</div>');
|
||||
$this->add('<img src="../images/alpha-fatal-error.gif">');
|
||||
$this->add('<img src="' . utils::GetAbsoluteUrlAppRoot() . 'images/alpha-fatal-error.gif">');
|
||||
$this->add('<div class="message message-valid">'.nl2br(Dict::S('UI:ErrorPage:KittyDisclaimer')).'</div>');
|
||||
}
|
||||
$this->log_error($sText);
|
||||
|
||||
@@ -54,7 +54,7 @@ class iTopWizardWebPage extends iTopWebPage
|
||||
$sStyle = ($iIndex == $this->m_iCurrentStep) ? 'wizActiveStep' : 'wizStep';
|
||||
$aSteps[] = "<div class=\"$sStyle\"><span>$sStepTitle</span></div>";
|
||||
}
|
||||
$sWizardHeader = "<div class=\"wizHeader\"><h1>".utils::EscapeHtml($this->s_title)."</h1>\n".implode("<div class=\"wizSeparator\"><img align=\"bottom\" src=\"../images/wizArrow.gif\"></div>", $aSteps)."<br style=\"clear:both;\"/></div>\n";
|
||||
$sWizardHeader = "<div class=\"wizHeader\"><h1>".utils::EscapeHtml($this->s_title)."</h1>\n".implode("<div class=\"wizSeparator\"><img align=\"bottom\" src=\"" . utils::GetAbsoluteUrlAppRoot() . "images/wizArrow.gif\"></div>", $aSteps)."<br style=\"clear:both;\"/></div>\n";
|
||||
$this->s_content = "$sWizardHeader<div class=\"wizContainer\">".$this->s_content."</div>";
|
||||
parent::output();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user