diff --git a/application/cmdbabstract.class.inc.php b/application/cmdbabstract.class.inc.php index 8cd534e5d..7b4e830ff 100644 --- a/application/cmdbabstract.class.inc.php +++ b/application/cmdbabstract.class.inc.php @@ -663,11 +663,11 @@ EOF } $sTip = addslashes($sTip); $oPage->add_ready_script("$('#synchro_$sInputId').qtip( { content: '$sTip', show: 'mouseover', hide: 'mouseout', style: { name: 'dark', tip: 'leftTop' }, position: { corner: { target: 'rightMiddle', tooltip: 'leftTop' }} } );"); + $sComments = $sSynchroIcon; } // Attribute is read-only $sHTMLValue = "".$this->GetAsHTML($sAttCode).''; - $sComments = $sSynchroIcon; } else { @@ -3199,8 +3199,15 @@ EOF $oImage = utils::ReadPostedDocument("attr_{$sFormPrefix}{$sAttCode}", 'fcontents'); $aSize = utils::GetImageSize($oImage->GetData()); $oImage = utils::ResizeImageToFit($oImage, $aSize[0], $aSize[1], $oAttDef->Get('storage_max_width'), $oAttDef->Get('storage_max_height')); - $aOtherData = utils::ReadPostedParam("attr_{$sFormPrefix}{$sAttCode}", array(), 'raw_data'); - $value = array('fcontents' => $oImage, 'remove' => $aOtherData['remove']); + $aOtherData = utils::ReadPostedParam("attr_{$sFormPrefix}{$sAttCode}", null, 'raw_data'); + if (is_array($aOtherData)) + { + $value = array('fcontents' => $oImage, 'remove' => $aOtherData['remove']); + } + else + { + $value = null; + } } elseif ($oAttDef->GetEditClass() == 'RedundancySetting') { diff --git a/application/ui.extkeywidget.class.inc.php b/application/ui.extkeywidget.class.inc.php index 574e91e17..3f606f4df 100644 --- a/application/ui.extkeywidget.class.inc.php +++ b/application/ui.extkeywidget.class.inc.php @@ -452,7 +452,17 @@ EOF $sDialogTitle = ''; $oPage->add('
'); $oPage->add("

".MetaModel::GetClassIcon($this->sTargetClass)." ".Dict::Format('UI:CreationTitle_Class', MetaModel::GetName($this->sTargetClass))."

\n"); - cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true)); + $aFieldsFlags = array(); + $aFieldsComments = array(); + foreach(MetaModel::ListAttributeDefs($this->sTargetClass) as $sAttCode => $oAttDef) + { + if (($oAttDef instanceof AttributeBlob) || (false)) + { + $aFieldsFlags[$sAttCode] = OPT_ATT_READONLY; + $aFieldsComments[$sAttCode] = ' '; + } + } + cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true, 'fieldsFlags' => $aFieldsFlags, 'fieldsComments' => $aFieldsComments)); $oPage->add('
'); // $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: $(window).width()*0.8, height: 'auto', autoOpen: false, modal: true, title: '$sDialogTitle'});\n"); $oPage->add_ready_script("\$('#ac_create_$this->iId').dialog({ width: 'auto', height: 'auto', maxHeight: $(window).height() - 50, autoOpen: false, modal: true, title: '$sDialogTitle'});\n"); diff --git a/dictionaries/de.dictionary.itop.ui.php b/dictionaries/de.dictionary.itop.ui.php index 0013592fa..58e3598e0 100644 --- a/dictionaries/de.dictionary.itop.ui.php +++ b/dictionaries/de.dictionary.itop.ui.php @@ -1111,5 +1111,6 @@ Wenn Aktionen mit Trigger verknüpft sind, bekommt jede Aktion eine Auftragsnumm 'ExcelExport:Statistics' => 'Statistik', 'portal:legacy_portal' => 'Endbenutzer-Portal', 'portal:backoffice' => 'iTop Backend', + 'UI:UploadNotSupportedInThisMode' => 'Die Modifizierung von Bildern oder Dateien wird in diesem Modus nicht unterstützt.', )); ?> diff --git a/dictionaries/dictionary.itop.ui.php b/dictionaries/dictionary.itop.ui.php index e5132f713..115fa028b 100644 --- a/dictionaries/dictionary.itop.ui.php +++ b/dictionaries/dictionary.itop.ui.php @@ -1330,4 +1330,5 @@ When associated with a trigger, each action is given an "order" number, specifyi 'UI:ToggleFullScreen' => 'Toggle Maximize / Minimize', 'UI:Button:ResetImage' => 'Recover the previous image', 'UI:Button:RemoveImage' => 'Remove the image', + 'UI:UploadNotSupportedInThisMode' => 'The modification of images or files is not supported in this mode.', )); diff --git a/dictionaries/fr.dictionary.itop.ui.php b/dictionaries/fr.dictionary.itop.ui.php index 798903a87..29d0021db 100644 --- a/dictionaries/fr.dictionary.itop.ui.php +++ b/dictionaries/fr.dictionary.itop.ui.php @@ -1173,4 +1173,5 @@ Lors de l\'association à un déclencheur, on attribue à chaque action un numé 'UI:ToggleFullScreen' => 'Agrandir / Minimiser', 'UI:Button:ResetImage' => 'Récupérer l\'image initiale', 'UI:Button:RemoveImage' => 'Supprimer l\'image', + 'UI:UploadNotSupportedInThisMode' => 'La modification d\'images ou de fichiers n\'est pas supportée dans ce mode.', )); \ No newline at end of file diff --git a/js/extkeywidget.js b/js/extkeywidget.js index f61fcd93e..02d4076d2 100644 --- a/js/extkeywidget.js +++ b/js/extkeywidget.js @@ -333,6 +333,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper { if (me.bSelectMode) { + $('#fstatus_'+me.id).html(''); } else {