function __construct(DatabaseDataField $paramDataField) { $this->setDataField($paramDataField); //Déclaration des propriétés générique (classe parent) parent::__construct(); $this->initObject($this->getHtmlName(), $this->getDataField()->getFieldLabel(), $this->getDataField()->getFieldValue(), $this->getDataField()->isFieldDiff(), $this->getDataField()->getDataValidationSuccessful(), $this->getDataField()->getDataWarningMessage(), $this->getDataField()->getIsFieldLock(), $this->getDataField()->getLinkFieldLock()); $this->getEventsForm()->setOnChangeWithAjaxAutoSave($this->getDataField()->getTableName(), $this->getDataField()->getKeyName(), $this->getDataField()->getKeyValue(), $this->getDataField()->getFieldName()); }
* Initilisation */ $intranetColumInfoModel = new IntranetColumnInfoModel($idIntranetColumnInfo); $explication_intranet_description = $intranetColumInfoModel->getDataField(IntranetColumnInfoModel::FIELDNAME_EXPLICATION_INTRANET_COLUMN_INFO)->getFieldValue(); $nom_table = $intranetColumInfoModel->getDataField(IntranetColumnInfoModel::FIELDNAME_TABLE_NAME_INTRANET_COLUMN_INFO)->getFieldValue(); $nom_variable = $intranetColumInfoModel->getDataField(IntranetColumnInfoModel::FIELDNAME_COLUMN_NAME_INTRANET_COLUMN_INFO)->getFieldValue(); $fichier = $intranetColumInfoModel->getDataField(IntranetColumnInfoModel::FIELDNAME_UPLOAD_NAME_FILE)->getFieldValue(); $title = DatabaseDescription::getFieldDocLabel($nom_table, $nom_variable); //L'utilisateur a-t-il la permission de modifier le manuel ? if ($edit_mode) { $action = 'record'; } /** * Affichage de la description */ $htmlTexArea = new HtmlTextArea(); $htmlTexArea->setTextAreaContent($explication_intranet_description); $htmlTexArea->setHtmlRenderToTable(); $content = $htmlTexArea->getHtmlResult(); if ($fichier) { $image_modif = " <{$html_table}>\n <tr class=titre_principal>\n <td> \n <span > <a href=" . ModuleConfigLib::CHEMIN_ACCES_UPLOAD . $fichier . " onclick=\"window.open(this.href); return false;\" >" . $fichier . "</a></span>\n </tr> \n </table>"; } $bouton_record = ""; /** * Modification de la description */ if ($edit_mode) { $bouton_record = "<tr><td>\n <center>\n <input type=submit value='Enregistrer'>\n </center>\n "; $htmlTexArea->setIsEditable(TRUE); $htmlTexArea->initObject(IntranetColumnInfoModel::FIELDNAME_EXPLICATION_INTRANET_COLUMN_INFO, NULL, $htmlTexArea->getTextAreaContent(), NULL, NULL, NULL); $content = $htmlTexArea->getHtmlResult();
public static function buildChapitreQualite() { $bloc = ''; $id_fta = self::$id_fta; $synthese_action = self::$synthese_action; $is_editable = self::$is_editable; $is_editable_false = false; $bloc .= '<tr class=titre_principal><td class>Demandeur</td></tr>'; //Durée de vie Garantie Client $htmlObject = new htmlInputNumber($field_name = 'Duree_de_vie', $table_name = ObjectFta::TABLE_ARTI_NAME, $value = self::$objectFta->getFieldValue($table_name, $field_name), $is_editable, $warning_update = ${'diff_' . $table_name}[$field_name]); $bloc .= $htmlObject->getHtmlResult(); //Durée de vie Production $htmlObject = new htmlInputNumber($field_name = 'duree_vie_technique_fta', $table_name = ObjectFta::TABLE_FTA_NAME, $value = self::$objectFta->getFieldValue($table_name, $field_name), $is_editable, $warning_update = ${'diff_' . $table_name}[$field_name]); $bloc .= $htmlObject->getHtmlResult(); //Liste des ingrédients $htmlObject = new HtmlTextArea($field = 'Composition', $table = ObjectFta::TABLE_ARTI_NAME, $value = self::$objectFta->getFieldValue($table, $field), $is_editable, $warning_update = ${'diff_' . $table_name}[$field_name]); $bloc .= $htmlObject->getHtmlResult(); //Température de conservation // $force_content_request = 'SELECT id_annexe_environnement_conservation_groupe, CONCAT(nom_annexe_environnement_conservation_groupe, ': ', temperature_par_defaut_annexe_environnement_conservation_groupe)' // . 'FROM annexe_environnement_conservation_groupe ' // . 'ORDER BY CONCAT(nom_annexe_environnement_conservation_groupe, temperature_par_defaut_annexe_environnement_conservation_groupe) '; $htmlObject = new OldHtmlList($data_field = self::$objectFta->getFieldDescription(ObjectFta::TABLE_ARTI_NAME, 'K_etat'), $content_label_field = new DatabaseDescriptionField($field_table = 'annexe_environnement_conservation_groupe', $field_name = 'temperature_par_defaut_annexe_environnement_conservation_groupe', $field_value = $data_field->getValue()), $default_value = 1, $is_editable, $warning_update = ${'diff_' . $table_name}[$field_name]); $bloc .= $htmlObject->getHtmlResult(); //$bloc .= '</table>'; return $bloc; }
/** * Return the a {@link WizardComponent} to allow editing of your * plugin in the Wizard. * * @return object WizardComponent * @access public * @since 5/8/07 */ function getWizardComponent() { $wrapper = new WComponentCollection(); $harmoni = Harmoni::instance(); ob_start(); $property = $wrapper->addComponent('comment', new WTextField()); $property->setSize(80); $property->setStartingDisplayText(_("Add a comment about your changes here.")); $property = $wrapper->addComponent('content', HtmlTextArea::withRowsAndColumns(20, 80)); $property->setValue($this->applyEditorSafeTextTemplates($this->cleanHTML($this->untokenizeLocalUrls($this->getContent())))); $property->chooseEditor('fck'); $fckArea = $property->getEditor('fck'); $fckArea->setOption('ToolbarSet', 'ContentBlock'); $fckArea->setConfigOption('CustomConfigurationsPath', MYPATH . '/javascript/fck_custom_config.js'); $fckArea->setConfigOption('ImageBrowserWindowWidth', '700'); $fckArea->setConfigOption('ImageBrowserWindowHeight', '600'); $fckTextArea = $property->getEditor('fck'); $harmoni->request->startNamespace('media'); $fckTextArea->enableFileBrowsingAtUrl($harmoni->request->quickURL('media', 'filebrowser', array('node' => $this->getId()))); $harmoni->request->endNamespace(); $writeJsCallback = "function (htmlString) { " . "edInsertContent(this.form.elements['[[fieldname:]]'], htmlString); " . "}"; $property->addPostHtml('none', "<br/>" . Segue_MediaLibrary::getMediaButtons($this->getId(), $writeJsCallback)); $writeJsCallback = "function (htmlString) { " . "var oEditor = FCKeditorAPI.GetInstance('[[fieldname:]]'); " . "oEditor.InsertHtml(htmlString); " . "}"; $property->addPostHtml('fck', "<br/>" . Segue_MediaLibrary::getMediaButtons($this->getId(), $writeJsCallback)); print "[[content]]"; print $this->getWikiHelp(); $property = $wrapper->addComponent('abstractLength', new WTextField()); $property->setSize(3); $property->setValue($this->getRawDescription()); print "\n\t<br/>"; print _("Abstract to [[abstractLength]] words. (Enter '0' for no abstract)"); print "\n\t<br/>"; print "\n\t<br/>"; print "[[comment]]"; $wrapper->setContent(ob_get_clean()); return $wrapper; }