mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
File or image upload is not supported (and thus disabled) when using the [+] button to create a new object inside a popup dialog.
SVN:trunk[4236]
This commit is contained in:
@@ -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 = "<span id=\"field_{$sInputId}\">".$this->GetAsHTML($sAttCode).'</span>';
|
||||
$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')
|
||||
{
|
||||
|
||||
@@ -452,7 +452,17 @@ EOF
|
||||
$sDialogTitle = '';
|
||||
$oPage->add('<div id="ac_create_'.$this->iId.'"><div class="wizContainer" style="vertical-align:top;"><div id="dcr_'.$this->iId.'">');
|
||||
$oPage->add("<h1>".MetaModel::GetClassIcon($this->sTargetClass)." ".Dict::Format('UI:CreationTitle_Class', MetaModel::GetName($this->sTargetClass))."</h1>\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] = ' <img src="../images/transp-lock.png" style="vertical-align:middle" title="'.htmlentities(Dict::S('UI:UploadNotSupportedInThisMode')).'"/>';
|
||||
}
|
||||
}
|
||||
cmdbAbstractObject::DisplayCreationForm($oPage, $this->sTargetClass, $oNewObj, array(), array('formPrefix' => $this->iId, 'noRelations' => true, 'fieldsFlags' => $aFieldsFlags, 'fieldsComments' => $aFieldsComments));
|
||||
$oPage->add('</div></div></div>');
|
||||
// $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");
|
||||
|
||||
@@ -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.',
|
||||
));
|
||||
?>
|
||||
|
||||
@@ -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.',
|
||||
));
|
||||
|
||||
@@ -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.',
|
||||
));
|
||||
@@ -333,6 +333,7 @@ function ExtKeyWidget(id, sTargetClass, sFilter, sTitle, bSelectMode, oWizHelper
|
||||
{
|
||||
if (me.bSelectMode)
|
||||
{
|
||||
$('#fstatus_'+me.id).html('');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user