예제 #1
0
 /**
  * get HTML admin (used to enter object values in admin)
  *
  * @param integer $fieldID, the current field id (only for poly object compatibility)
  * @param CMS_language $language, the current admin language
  * @param string prefixname : the prefix to use for post names
  * @return string : the html admin
  * @access public
  */
 function getHTMLAdmin($fieldID, $language, $prefixName)
 {
     $return = parent::getHTMLAdmin($fieldID, $language, $prefixName);
     //$params = $this->getParamsValues();
     //get module codename
     $moduleCodename = CMS_poly_object_catalog::getModuleCodenameForField($this->_field->getID());
     //create field value
     $maxFileSize = CMS_file::getMaxUploadFileSize('K');
     $value = $this->_subfieldValues[0]->getValue();
     $return['name'] = 'polymodFieldsValue[href' . $prefixName . $this->_field->getID() . '_0]';
     $return['xtype'] = 'atmLinkField';
     $return['value'] = (string) $value;
     $return['uploadCfg'] = array('file_size_limit' => $maxFileSize, 'file_types' => '*.*', 'file_types_description' => $language->getMessage(self::MESSAGE_OBJECT_HREF_ALL_FILES) . ' ...');
     $return['fileinfos'] = array('module' => $moduleCodename, 'visualisation' => RESOURCE_DATA_LOCATION_EDITED);
     $return['linkConfig'] = array();
     return $return;
 }
예제 #2
0
 /**
  * Get field XHTML
  * 
  * @param CMS_language $formLanguage : the language for messages
  * @return array array(label, input)
  */
 function getFieldXHTML($formLanguage = '')
 {
     // Language
     global $cms_language;
     if (!$formLanguage) {
         $formLanguage = $cms_language;
     }
     //generate field id datas
     $fieldIDDatas = $this->generateFieldIdDatas();
     $input = $label = '';
     switch ($this->getAttribute("type")) {
         case 'hidden':
             $input = '<input type="hidden" value="' . io::htmlspecialchars($this->getAttribute("value")) . '" id="' . $fieldIDDatas . '" name="' . $this->getAttribute("name") . '" />';
             break;
         case 'select':
             $label = '<label for="' . $fieldIDDatas . '">' . $this->getAttribute("label") . '</label>';
             $input = '<select name="' . $this->getAttribute("name") . '" id="' . $fieldIDDatas . '">';
             $options = $this->getAttribute("options");
             if (sizeof($options)) {
                 foreach ($options as $aValue => $anOption) {
                     $selected = $this->getAttribute("value") == $aValue ? ' selected="selected"' : '';
                     $input .= '<option value="' . $aValue . '"' . $selected . '>' . $anOption . '</option>';
                 }
             }
             $input .= '</select>';
             break;
         case 'text':
         case 'email':
         case 'url':
         case 'integer':
         case 'file':
         case 'pass':
         case 'checkbox':
             $label = '<label for="' . $fieldIDDatas . '">' . $this->getAttribute("label") . '</label>';
             $input = '<input';
             $fileHelp = '';
             switch ($this->getAttribute("type")) {
                 case 'file':
                     $input .= ' type="file"';
                     $fileParams = $this->getAttribute("params");
                     $fileHelpTab = array();
                     if ($fileParams) {
                         foreach ($fileParams as $fileParamName => $fileParamValue) {
                             switch ($fileParamName) {
                                 case 'extensions':
                                     $fileHelpTab['extensions'] = $formLanguage->getMessage(self::MESSAGE_CMS_FORMS_FILE_PARAMS_ALLOWED_EXTENSIONS, false, MOD_CMS_FORMS_CODENAME) . ' ' . $fileParamValue;
                                     break;
                                 case 'weight':
                                     $fileHelpTab['weight'] = $formLanguage->getMessage(self::MESSAGE_CMS_FORMS_FILE_PARAMS_MAX_FILESIZE, false, MOD_CMS_FORMS_CODENAME) . ' ' . $fileParamValue . 'Ko';
                                     break;
                             }
                         }
                     }
                     if (!isset($fileHelpTab['weight'])) {
                         $fileHelpTab['weight'] = $formLanguage->getMessage(self::MESSAGE_CMS_FORMS_FILE_PARAMS_MAX_FILESIZE, false, MOD_CMS_FORMS_CODENAME) . ' ' . CMS_file::getMaxUploadFileSize('K') . 'Ko';
                     }
                     if ($fileHelpTab) {
                         $fileHelp = '<br/>(' . implode(' ; ', $fileHelpTab) . ')';
                     }
                     break;
                 case 'pass':
                     $input .= ' type="password" value=""';
                     break;
                 case 'checkbox':
                     $input .= ' type="checkbox" value="1" class="checkbox" ' . ($this->getAttribute("value") ? ' checked="checked"' : '');
                     break;
                 case 'text':
                 case 'email':
                 case 'url':
                 case 'integer':
                 default:
                     $input .= ' type="text" value="' . io::htmlspecialchars($this->getAttribute("value")) . '"';
                     break;
             }
             $fileHelp = $fileHelp ? ' <span class="inputHelp">' . $fileHelp . '</span>' : '';
             $input .= ' id="' . $fieldIDDatas . '" name="' . $this->getAttribute("name") . '" />' . $fileHelp;
             break;
         case 'submit':
             $input = '<input id="' . $fieldIDDatas . '" type="submit" class="button" name="' . $this->getAttribute("name") . '" value="' . $this->getAttribute("label") . '" />';
             break;
         case 'textarea':
             $label = '<label for="' . $fieldIDDatas . '">' . $this->getAttribute("label") . '</label>';
             $input = '<textarea cols="40" rows="6" id="' . $fieldIDDatas . '" name="' . $this->getAttribute("name") . '">' . io::htmlspecialchars($this->getAttribute("value")) . '</textarea>';
             break;
     }
     return array($label, $input);
 }
}
//check user rights
if (!$cms_user->hasPageClearance($cms_page->getID(), CLEARANCE_PAGE_EDIT)) {
    CMS_grandFather::raiseError('Error, user has no rights on page : ' . $cms_page->getID());
    $view->show();
}
//get block datas
if (class_exists($blockClass)) {
    $cms_block = new $blockClass();
    $cms_block->initializeFromBasicAttributes($blockId);
    $rawDatas = $cms_block->getRawData($cms_page->getID(), $cs, $rowTag, RESOURCE_LOCATION_EDITION, false);
} else {
    CMS_grandFather::raiseError('Error, can\'t get block class : ' . $blockClass);
    $view->show();
}
$maxFileSize = CMS_file::getMaxUploadFileSize('K');
if ($rawDatas['file'] && file_exists(PATH_MODULES_FILES_STANDARD_FS . '/edition/' . $rawDatas['file'])) {
    $file = new CMS_file(PATH_MODULES_FILES_STANDARD_FS . '/edition/' . $rawDatas['file']);
    $fileDatas = array('filename' => $file->getName(false), 'filepath' => $file->getFilePath(CMS_file::WEBROOT), 'filesize' => $file->getFileSize(), 'fileicon' => $file->getFileIcon(CMS_file::WEBROOT), 'extension' => $file->getExtension());
} else {
    $fileDatas = array('filename' => '', 'filepath' => '', 'filesize' => '', 'fileicon' => '', 'extension' => '');
}
$filePath = $fileDatas['filepath'];
$fileDatas = sensitiveIO::jsonEncode($fileDatas);
$flashvars = sensitiveIO::sanitizeJSString($rawDatas["flashvars"]);
$params = sensitiveIO::sanitizeJSString($rawDatas["params"]);
$attributes = sensitiveIO::sanitizeJSString($rawDatas["attributes"]);
$jscontent = <<<END
\tvar blockWindow = Ext.getCmp('{$winId}');
\t//set window title
\tblockWindow.setTitle('{$cms_language->getJsMessage(MESSAGE_EDIT_FLASH)}');
예제 #4
0
		    <br />
		    <input onclick="manageFormFromDefault();" type="button" fckLang="DlgCMSFormsReturn" value="Retour au formulaire"><br />
		    ' . $cms_language->getMessage(MESSAGE_PAGE_BLOCK_GENERAL_VARS_EXPLANATION, array($cms_language->getDateFormatMask(), $cms_language->getDateFormatMask(), $cms_language->getDateFormatMask())) . '
	    </div>
	    <div id="divFileParams" style="display: none">
		    <strong><span fckLang="DlgCMSFormsFileParamsTitle">Modifiez ici les parametres :</span></strong>
		    <input id="fieldIDFileParamValue" type="hidden" name="formIDValue" value="" />
		    <input id="serverMaxFileSize" type="hidden" name="serverMaxFileSize" value="' . CMS_file::getMaxUploadFileSize('K') . '" />
		    <div style="display:none;" id="fileParamsError"><span style="color:red;" fckLang="DlgCMSFormsFileParamsError">Erreur</span></div>
		    <table width="100%">
			    <tr>
				    <td nowrap width="100%" colSpan="4"><span fckLang="DlgCMSFormsAllowedExtensions">Extensions autorisees :</span>&nbsp;<input style="WIDTH: 50%" id="fileParamsExtensions" type="text"> <span fckLang="allowedExtensionsHelp">Separees par des points-virgules</span></td>
			    </tr>
			    <tr>
				    <td nowrap width="100%" colSpan="4"><span fckLang="DlgCMSFormsMaxWeight">Poids maximum :</span>&nbsp;<input style="WIDTH: 20%" id="fileParamsWeight" type="text"> <span fckLang="DlgCMSFormsMaxWeightHelp">ko (1Mo = 1024Ko)</span>
				        <br/><span fckLang="DlgCMSFormsMaxServerFileSize">Max server file size</span>' . CMS_file::getMaxUploadFileSize('K') . 'Ko (' . CMS_file::getMaxUploadFileSize('M') . 'Mo)
				    </td>
			    </tr>
		    </table>
		    <br />
		    <input onclick="manageFormFromFileParams();" type="button" fckLang="DlgCMSFormsReturn" value="Retour au formulaire"><br />
		    ' . $cms_language->getMessage(MESSAGE_PAGE_BLOCK_GENERAL_VARS_EXPLANATION, array($cms_language->getDateFormatMask(), $cms_language->getDateFormatMask(), $cms_language->getDateFormatMask())) . '
	    </div>';
        break;
    case 4:
        // used to send server form content to wysiwyg after analyse
        $replace = array("\n" => "", "\r" => "", "'" => "\\'");
        //pr($xhtml);
        $content = '
			<div id="divInfo" style="DISPLAY: none">
				<input id="codeSent" name="codeSent" value="" type="hidden" />
예제 #5
0
    /**
     * get HTML admin (used to enter object values in admin)
     *
     * @param integer $fieldID, the current field id (only for poly object compatibility)
     * @param CMS_language $language, the current admin language
     * @param string prefixname : the prefix to use for post names
     * @return string : the html admin
     * @access public
     */
    function getHTMLAdmin($fieldID, $language, $prefixName)
    {
        $return = parent::getHTMLAdmin($fieldID, $language, $prefixName);
        $params = $this->getParamsValues();
        $maxFileSize = CMS_file::getMaxUploadFileSize('K');
        //get module codename
        $moduleCodename = CMS_poly_object_catalog::getModuleCodenameForField($this->_field->getID());
        //Image datas
        if ($this->_subfieldValues[0]->getValue() && file_exists(PATH_MODULES_FILES_FS . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[0]->getValue())) {
            $file = new CMS_file(PATH_MODULES_FILES_FS . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[0]->getValue());
            $imageDatas = array('filename' => $file->getName(false), 'filepath' => $file->getFilePath(CMS_file::WEBROOT), 'filesize' => $file->getFileSize(), 'fileicon' => $file->getFileIcon(CMS_file::WEBROOT), 'extension' => $file->getExtension());
        } else {
            $imageDatas = array('filename' => '', 'filepath' => '', 'filesize' => '', 'fileicon' => '', 'extension' => '');
        }
        //move title from offset 1 to offset 0
        $titleField = $return['items'][1];
        $return['items'][1] = $return['items'][0];
        $return['items'][0] = $titleField;
        //Title
        unset($return['items'][0]['hideLabel']);
        if (isset($params['legendMandatory']) && $params['legendMandatory']) {
            $return['items'][0]['fieldLabel'] = '<span class="atm-red">*</span> ' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_LABEL, false, MOD_POLYMOD_CODENAME);
        } else {
            $return['items'][0]['fieldLabel'] = $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_LABEL, false, MOD_POLYMOD_CODENAME);
        }
        $return['items'][0]['allowBlank'] = $this->_field->getValue('required') && isset($params['legendMandatory']) && $params['legendMandatory'] ? false : true;
        //Thumbnail
        unset($return['items'][1]['hideLabel']);
        $return['items'][1]['xtype'] = 'atmImageUploadField';
        $return['items'][1]['emptyText'] = $language->getMessage(self::MESSAGE_SELECT_PICTURE);
        $return['items'][1]['fieldLabel'] = $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_THUMBNAIL, false, MOD_POLYMOD_CODENAME);
        if (!$params['makeZoom']) {
            if ($params['maxWidth']) {
                $return['items'][1]['maxWidth'] = $params['maxWidth'];
            }
            if ($params['maxHeight']) {
                $return['items'][1]['maxHeight'] = $params['maxHeight'];
            }
        }
        $return['items'][1]['uploadCfg'] = array('file_size_limit' => $maxFileSize, 'file_types' => '*.jpg;*.jpeg;*.png;*.gif', 'file_types_description' => $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_THUMBNAIL, false, MOD_POLYMOD_CODENAME) . ' ...');
        $return['items'][1]['fileinfos'] = $imageDatas;
        $return['items'][1]['fileinfos']['module'] = $moduleCodename;
        $return['items'][1]['fileinfos']['visualisation'] = RESOURCE_DATA_LOCATION_EDITED;
        $checkBoxId = 'check' . md5(mt_rand() . microtime());
        //Image datas
        if ($params['useDistinctZoom'] || $params['makeZoom']) {
            $zoomId = 'zoom' . md5(mt_rand() . microtime());
            if ($this->_subfieldValues[2]->getValue() && file_exists(PATH_MODULES_FILES_FS . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[2]->getValue())) {
                $file = new CMS_file(PATH_MODULES_FILES_FS . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[2]->getValue());
                $zoomDatas = array('filename' => $file->getName(false), 'filepath' => $file->getFilePath(CMS_file::WEBROOT), 'filesize' => $file->getFileSize(), 'fileicon' => $file->getFileIcon(CMS_file::WEBROOT), 'extension' => $file->getExtension());
            } else {
                $zoomDatas = array('filename' => '', 'filepath' => '', 'filesize' => '', 'fileicon' => '', 'extension' => '');
            }
            unset($return['items'][2]['hideLabel']);
            $return['items'][2]['id'] = $zoomId;
            $return['items'][2]['allowBlank'] = true;
            $return['items'][2]['xtype'] = 'atmImageUploadField';
            $return['items'][2]['emptyText'] = $language->getMessage(self::MESSAGE_SELECT_PICTURE);
            $return['items'][2]['fieldLabel'] = $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_ZOOM, false, MOD_POLYMOD_CODENAME);
            $return['items'][2]['uploadCfg'] = array('file_size_limit' => $maxFileSize, 'file_types' => '*.jpg;*.jpeg;*.png;*.gif', 'file_types_description' => $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_THUMBNAIL, false, MOD_POLYMOD_CODENAME) . ' ...');
            $return['items'][2]['fileinfos'] = $zoomDatas;
            $return['items'][2]['fileinfos']['module'] = $moduleCodename;
            $return['items'][2]['fileinfos']['visualisation'] = RESOURCE_DATA_LOCATION_EDITED;
            if ($params['maxZoomWidth']) {
                $return['items'][2]['maxWidth'] = $params['maxZoomWidth'];
            }
            if ($params['maxZoomHeight']) {
                $return['items'][2]['maxHeight'] = $params['maxZoomHeight'];
            }
            if (!$this->_subfieldValues[2]->getValue() && $params['makeZoom']) {
                $return['items'][2]['listeners'] = array('render' => sensitiveIO::sanitizeJSString('function(el){
					var fieldCt = el.label.parent();
					if (fieldCt) {
						fieldCt.setVisibilityMode(Ext.Element.DISPLAY);
						fieldCt.hide();
					}
				}', false, false));
            }
        } else {
            $return['items'][2]['xtype'] = 'hidden';
        }
        if ($params['makeZoom']) {
            $boxLabel = $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_USE_ORIGINAL_AS_ZOOM, false, MOD_POLYMOD_CODENAME);
            if ($params['maxWidth'] > 0 && !$params['maxHeight']) {
                $boxLabel .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_DESC, array($params['maxWidth']), MOD_POLYMOD_CODENAME) . '</small>';
            } elseif ($params['maxHeight'] && !$params['maxWidth']) {
                $boxLabel .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_DESC_HEIGHT, array($params['maxHeight']), MOD_POLYMOD_CODENAME) . '</small>';
            } elseif ($params['maxWidth'] && $params['maxHeight']) {
                $boxLabel .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_DESC_HEIGHT_AND_WIDTH, array($params['maxWidth'], $params['maxHeight']), MOD_POLYMOD_CODENAME) . '</small>';
            }
            $checkField = array('allowBlank' => true, 'xtype' => 'checkbox', 'id' => $checkBoxId, 'checked' => !$params['useDistinctZoom'] && !$this->_subfieldValues[2]->getValue(), 'inputValue' => 1, 'name' => 'polymodFieldsValue[' . $prefixName . $this->_field->getID() . '_makeZoom]', 'boxLabel' => $boxLabel, 'height' => 'auto', 'labelSeparator' => '');
            if (isset($zoomId)) {
                $checkField['listeners'] = array('check' => sensitiveIO::sanitizeJSString('function(el, checked){
					var fieldCt = Ext.getCmp(\'' . $zoomId . '\').label.parent();
					if (fieldCt) {
						fieldCt.setVisibilityMode(Ext.Element.DISPLAY);
						if (checked) {
							fieldCt.hide(true);
						} else {
							fieldCt.show(true);
							Ext.getCmp(\'' . $zoomId . '\').syncSize();
						}
					}
				}', false, false));
            }
            //set checkbox to offset 2
            $return['items'][3] = $return['items'][2];
            $return['items'][2] = $checkField;
        }
        //reset key numbers
        $return['items'] = array_values($return['items']);
        return $return;
    }
예제 #6
0
    /**
     * Return the needed form field tag for current object field
     *
     * @param array $values : parameters values array(parameterName => parameterValue) in :
     *     id : the form field id to set
     * @param multidimentionnal array $tags : xml2Array content of atm-function tag
     * @return string : the form field HTML tag
     * @access public
     */
    function getInput($fieldID, $language, $inputParams)
    {
        //hidden field : use parent method
        if (isset($inputParams['hidden']) && ($inputParams['hidden'] == 'true' || $inputParams['hidden'] == 1)) {
            return parent::getInput($fieldID, $language, $inputParams);
        }
        $params = $this->getParamsValues();
        if (isset($inputParams['prefix'])) {
            $prefixName = $inputParams['prefix'];
        } else {
            $prefixName = '';
        }
        //serialize all htmlparameters
        $htmlParameters = $this->serializeHTMLParameters($inputParams);
        $tdclass = isset($inputParams['tdclass']) ? ' class="' . $inputParams['tdclass'] . '"' : '';
        $thclass = isset($inputParams['thclass']) ? ' class="' . $inputParams['thclass'] . '"' : '';
        $html = '
		<table>
		<tr>
			<th' . $thclass . '>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_LABEL, false, MOD_POLYMOD_CODENAME) . '</th>
			<td' . $tdclass . '><input' . $htmlParameters . ' name="' . $prefixName . $this->_field->getID() . '_0" value="' . $this->_subfieldValues[0]->getValue() . '" type="text" /></td>
		</tr>';
        if ($params['useThumbnail']) {
            $html .= '
			<tr>
				<th' . $thclass . '>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_THUMBNAIL, false, MOD_POLYMOD_CODENAME) . '</th>
				<td' . $tdclass . '><input' . $htmlParameters . ' name="' . $prefixName . $this->_field->getID() . '_1" type="file" />';
            if ($params['thumbMaxWidth'] > 0 && !$params['thumbMaxHeight']) {
                $html .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_DESC, array($params['thumbMaxWidth']), MOD_POLYMOD_CODENAME) . '</small>';
            } elseif ($params['thumbMaxHeight'] > 0 && !$params['thumbMaxWidth']) {
                $html .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_DESC_HEIGHT, array($params['thumbMaxHeight']), MOD_POLYMOD_CODENAME) . '</small>';
            } elseif ($params['thumbMaxWidth'] && $params['thumbMaxHeight']) {
                $html .= '&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_IMAGE_FIELD_DESC_HEIGHT_AND_WIDTH, array($params['thumbMaxWidth'], $params['thumbMaxHeight']), MOD_POLYMOD_CODENAME) . '</small>';
            }
            $html .= '</td>
			</tr>';
        }
        $html .= '
			<tr>
				<th' . $thclass . '>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_SOURCEFILE, false, MOD_POLYMOD_CODENAME) . '</th>
				<td' . $tdclass . '><input' . $htmlParameters . ' name="' . $prefixName . $this->_field->getID() . '_4" type="file" />&nbsp;<small>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_MAX_FILESIZE, array(CMS_file::getMaxUploadFileSize('M') . 'M'), MOD_POLYMOD_CODENAME) . '</small></td>
			</tr>';
        if ($params['allowFtp'] && is_dir(PATH_REALROOT_FS . $params['ftpDir'])) {
            $html .= '
			<tr>
				<th' . $thclass . '>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_EXTERNALSOURCEFILE, false, MOD_POLYMOD_CODENAME) . '</th>
				<td' . $tdclass . '><input' . $htmlParameters . ' name="' . $prefixName . $this->_field->getID() . '_externalfile" type="text" />&nbsp;<br /><small>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_EXTERNALSOURCEFILE_FTP, array($params['ftpDir']), MOD_POLYMOD_CODENAME) . '</small></td>
			</tr>';
        }
        // If delete old file and no new file, set "delete" hidden input to mandatory check
        if ((!isset($_FILES[$prefixName . $this->_field->getID() . '_4']) || !$_FILES[$prefixName . $this->_field->getID() . '_4']['name']) && isset($_REQUEST[$prefixName . $this->_field->getID() . '_delete']) && $_REQUEST[$prefixName . $this->_field->getID() . '_delete']) {
            $html .= '<input name="' . $prefixName . $this->_field->getID() . '_delete" id="' . $prefixName . $this->_field->getID() . '_delete" type="hidden" value="1" />';
        }
        //current file
        if ($this->_subfieldValues[4]->getValue()) {
            //get module codename
            $moduleCodename = CMS_poly_object_catalog::getModuleCodenameForField($this->_field->getID());
            $filepath = $this->_subfieldValues[3]->getValue() == self::OBJECT_FILE_TYPE_INTERNAL ? PATH_MODULES_FILES_WR . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[4]->getValue() : $this->_subfieldValues[4]->getValue();
            $thumbnail = $this->_subfieldValues[1]->getValue() ? '<br /><a href="' . $filepath . '" target="_blank"><img src="' . PATH_MODULES_FILES_WR . '/' . $moduleCodename . '/' . RESOURCE_DATA_LOCATION_EDITED . '/' . $this->_subfieldValues[1]->getValue() . '" alt="' . $this->_subfieldValues[0]->getValue() . '" title="' . $this->_subfieldValues[0]->getValue() . '" border="0" /></a>' : '';
            $icon = $this->_getFileIcon();
            if ($icon) {
                $icon = '<img src="' . $icon . '" alt="' . $this->_getFileExtension() . '" title="' . $this->_getFileExtension() . '" border="0" />&nbsp;';
            }
            $file = '<a href="' . $filepath . '" target="_blank">' . $icon . $this->_subfieldValues[0]->getValue() . '</a> (' . $this->_subfieldValues[2]->getValue() . 'Mo)';
            $html .= '
			<tr>
				<th' . $thclass . '>' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_ACTUAL_FILE, false, MOD_POLYMOD_CODENAME) . '</th>
				<td' . $tdclass . '>' . $file . ' <label for="' . $prefixName . $this->_field->getID() . '_delete"><input name="' . $prefixName . $this->_field->getID() . '_delete" id="' . $prefixName . $this->_field->getID() . '_delete" type="checkbox" value="1" />' . $language->getMessage(self::MESSAGE_OBJECT_FILE_FIELD_DELETE, false, MOD_POLYMOD_CODENAME) . '</label><br />' . $thumbnail . '
					<input type="hidden" name="' . $prefixName . $this->_field->getID() . '_1_hidden" value="' . $this->_subfieldValues[1]->getValue() . '" />
					<input type="hidden" name="' . $prefixName . $this->_field->getID() . '_2_hidden" value="' . $this->_subfieldValues[2]->getValue() . '" />
					<input type="hidden" name="' . $prefixName . $this->_field->getID() . '_3_hidden" value="' . $this->_subfieldValues[3]->getValue() . '" />
					<input type="hidden" name="' . $prefixName . $this->_field->getID() . '_4_hidden" value="' . $this->_subfieldValues[4]->getValue() . '" />
				</td>
			</tr>';
        }
        if (POLYMOD_DEBUG) {
            $html .= '	<tr>
							<td' . $tdclass . ' colspan="2"><span class="admin_text_alert">(Field : ' . $this->_field->getID() . '
							<br />File : ' . $this->_subfieldValues[4]->getValue() . '
							<br />Filesize : ' . $this->_subfieldValues[2]->getValue() . '
							<br />Thumbnail : ' . $this->_subfieldValues[1]->getValue() . '
							<br />DestinationType : ' . $this->_subfieldValues[3]->getValue() . ')</span></td>
						</tr>';
        }
        $html .= '</table>';
        //append html hidden field which store field name
        if ($html) {
            $html .= '<input type="hidden" name="polymodFields[' . $this->_field->getID() . ']" value="' . $this->_field->getID() . '" />';
        }
        return $html;
    }