* Copyright (C) 2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /** * The following vars must be defined: * $type2label * $form * $conf, $lang, * The following vars may also be defined: * $elementtype */ // Protection to avoid direct call of template if (empty($conf) || ! is_object($conf)) { print "Error, template page can't be called as URL"; exit; } $langs->load("modulebuilder"); ?>
?attrname=" id="formeditextrafield" method="post"> attributes[$elementtype]['label'][$attrname]; $type=$extrafields->attributes[$elementtype]['type'][$attrname]; $size=$extrafields->attributes[$elementtype]['size'][$attrname]; $computed=$extrafields->attributes[$elementtype]['computed'][$attrname]; $default=$extrafields->attributes[$elementtype]['default'][$attrname]; $unique=$extrafields->attributes[$elementtype]['unique'][$attrname]; $required=$extrafields->attributes[$elementtype]['required'][$attrname]; $pos=$extrafields->attributes[$elementtype]['pos'][$attrname]; $alwayseditable=$extrafields->attributes[$elementtype]['alwayseditable'][$attrname]; $param=$extrafields->attributes[$elementtype]['param'][$attrname]; $perms=$extrafields->attributes[$elementtype]['perms'][$attrname]; $langfile=$extrafields->attributes[$elementtype]['langfile'][$attrname]; $list=$extrafields->attributes[$elementtype]['list'][$attrname]; $entitycurrentorall=$extrafields->attributes[$elementtype]['entityid'][$attrname]; if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param)) { $param_chain = ''; foreach ($param['options'] as $key => $value) { if(strlen($key)) { $param_chain .= $key.','.$value."\n"; } } } elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($type == 'password')) { $paramlist=array_keys($param['options']); $param_chain = $paramlist[0]; } ?> multicompany->enabled) { ?>
trans("Label"); ?>
trans("AttributeCode"); ?>
trans("Type"); ?> array('varchar', 'phone', 'mail', 'url', 'select', 'password', 'text', 'html'), 'text'=>array('text','html'), 'html'=>array('text','html'), 'password'=>array('password', 'varchar'), 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'select'=>array('varchar', 'phone', 'mail', 'url', 'select') ); if (in_array($type, array_keys($typewecanchangeinto))) { $newarray=array(); print ''; } else { print $type2label[$type]; print ''; } ?>
trans("Size"); ?>
trans("Value"); ?>
textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0,'', 0, 2, 'helpvalue1')?> textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0,'', 0, 2, 'helpvalue2')?> textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0,'', 0, 2, 'helpvalue3')?> textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0,'', 0, 2, 'helpvalue4')?> textwithpicto('', $langs->trans("ExtrafieldParamHelpPassword"),1,0,'', 0, 2, 'helpvalue5')?>
trans("Position"); ?>
trans("LanguageFile"); ?>
textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?>
trans("DefaultValue").' ('.$langs->trans("Database").')'; ?>
trans("Unique"); ?>>
trans("Required"); ?>>
trans("AlwaysEditable"); ?>>
trans("AllEntities"); ?>>
textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
">      ">