diff --git a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php index 5bc617d5c..3801d2e29 100644 --- a/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php +++ b/sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php @@ -35,9 +35,9 @@ use utils; */ class BsFileUploadFieldRenderer extends BsFieldRenderer { - /** - * @inheritDoc - */ + /** + * @inheritDoc + */ public function Render() { $oOutput = parent::Render(); @@ -52,15 +52,16 @@ class BsFileUploadFieldRenderer extends BsFieldRenderer $oOutput->AddHtml('
'); // Label - $oOutput->AddHtml('
'); - if ($this->oField->GetLabel() !== '') + $oOutput->AddHtml('
'); + if ($this->oField->GetLabel() !== '') { - $oOutput->AddHtml(''); + $oOutput->AddHtml(''); } - $oOutput->AddHtml('
'); + $oOutput->AddHtml('
'); - // Value - $oOutput->AddHtml('
'); + // Value + $oOutput->AddHtml('
'); // - Field feedback $oOutput->AddHtml('
'); // Starting files container @@ -73,16 +74,16 @@ class BsFileUploadFieldRenderer extends BsFieldRenderer // Removing upload input if in read only // TODO : Add max upload size when itop attachment has been refactored if (!$this->oField->GetReadOnly()) - { - $oOutput->AddHtml('
' . Dict::S('Attachments:AddAttachment') . '' . InlineImage::GetMaxUpload() . '
'); + { + $oOutput->AddHtml('
'.Dict::S('Attachments:AddAttachment').''.InlineImage::GetMaxUpload().'
'); } // Ending files container - $oOutput->AddHtml('
'); - $oOutput->AddHtml('
'); + $oOutput->AddHtml('
'); + $oOutput->AddHtml(''); // Ending field container $oOutput->AddHtml(''); - + // JS for file upload $iMaxUploadInBytes = AttachmentPlugIn::GetMaxUploadSize(); $sMaxUploadLabel = AttachmentPlugIn::GetMaxUpload(); @@ -90,7 +91,7 @@ class BsFileUploadFieldRenderer extends BsFieldRenderer $sFileTooBigLabelForJS = addslashes($sFileTooBigLabel); // Note : This is based on itop-attachement/main.attachments.php $oOutput->AddJs( -<<oField->GetObject()); @@ -272,12 +273,12 @@ EOF $iAttId = $oAttachment->GetKey(); $oDoc = $oAttachment->Get('contents'); $sFileName = htmlentities($oDoc->GetFileName(), ENT_QUOTES, 'UTF-8'); - $sIcon = utils::GetAbsoluteUrlAppRoot() . 'env-' . utils::GetCurrentEnvironment() . '/itop-attachments/icons/image.png'; + $sIcon = utils::GetAbsoluteUrlAppRoot().'env-'.utils::GetCurrentEnvironment().'/itop-attachments/icons/image.png'; $sPreview = $oDoc->IsPreviewAvailable() ? 'true' : 'false'; $sDownloadLink = str_replace('-sAttachmentId-', $iAttId, $this->oField->GetDownloadEndpoint()); $oOutput->Addhtml( -<<