Fix label of extrafields
This commit is contained in:
parent
618c85ceb1
commit
0bf678e09e
@ -154,8 +154,8 @@ class ExtraFields
|
|||||||
|
|
||||||
|
|
||||||
public static $type2label = array(
|
public static $type2label = array(
|
||||||
'varchar'=>'String',
|
'varchar'=>'String1Line',
|
||||||
'text'=>'TextLong',
|
'text'=>'TextLongNLines',
|
||||||
'html'=>'HtmlText',
|
'html'=>'HtmlText',
|
||||||
'int'=>'Int',
|
'int'=>'Int',
|
||||||
'double'=>'Float',
|
'double'=>'Float',
|
||||||
|
|||||||
@ -186,8 +186,10 @@ elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($
|
|||||||
?>
|
?>
|
||||||
<!-- Label -->
|
<!-- Label -->
|
||||||
<tr><td class="titlefield fieldrequired"><?php echo $langs->trans("LabelOrTranslationKey"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $label; ?>"></td></tr>
|
<tr><td class="titlefield fieldrequired"><?php echo $langs->trans("LabelOrTranslationKey"); ?></td><td class="valeur"><input type="text" name="label" size="40" value="<?php echo $label; ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Code -->
|
<!-- Code -->
|
||||||
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
|
<tr><td class="fieldrequired"><?php echo $langs->trans("AttributeCode"); ?></td><td class="valeur"><?php echo $attrname; ?></td></tr>
|
||||||
|
|
||||||
<!-- Type -->
|
<!-- Type -->
|
||||||
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
<tr><td class="fieldrequired"><?php echo $langs->trans("Type"); ?></td><td class="valeur">
|
||||||
<?php
|
<?php
|
||||||
@ -204,6 +206,10 @@ $typewecanchangeinto = array(
|
|||||||
'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'),
|
'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'),
|
||||||
'select'=>array('varchar', 'phone', 'mail', 'url', 'select')
|
'select'=>array('varchar', 'phone', 'mail', 'url', 'select')
|
||||||
);
|
);
|
||||||
|
/* Disabled because text is text on several lines, when varchar is text on 1 line, we should not be able to convert
|
||||||
|
if ($size <= 255 && in_array($type, array('text', 'html'))) {
|
||||||
|
$typewecanchangeinto['text'][] = 'varchar';
|
||||||
|
}*/
|
||||||
|
|
||||||
if (in_array($type, array_keys($typewecanchangeinto)))
|
if (in_array($type, array_keys($typewecanchangeinto)))
|
||||||
{
|
{
|
||||||
@ -225,8 +231,10 @@ else
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
<!-- Size -->
|
<!-- Size -->
|
||||||
<tr class="extra_size"><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" size="5" value="<?php echo $size; ?>"></td></tr>
|
<tr class="extra_size"><td class="fieldrequired"><?php echo $langs->trans("Size"); ?></td><td><input id="size" type="text" name="size" size="5" value="<?php echo $size; ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Value (for some fields like password, select list, radio, ...) -->
|
<!-- Value (for some fields like password, select list, radio, ...) -->
|
||||||
<tr id="value_choice">
|
<tr id="value_choice">
|
||||||
<td>
|
<td>
|
||||||
@ -247,33 +255,44 @@ else
|
|||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<!-- Position -->
|
<!-- Position -->
|
||||||
<tr><td class="titlefield"><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo dol_escape_htmltag($pos); ?>"></td></tr>
|
<tr><td class="titlefield"><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo dol_escape_htmltag($pos); ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Language file -->
|
<!-- Language file -->
|
||||||
<tr><td class="titlefield"><?php echo $langs->trans("LanguageFile"); ?></td><td class="valeur"><input type="text" name="langfile" class="minwidth200" value="<?php echo dol_escape_htmltag($langfile); ?>"></td></tr>
|
<tr><td class="titlefield"><?php echo $langs->trans("LanguageFile"); ?></td><td class="valeur"><input type="text" name="langfile" class="minwidth200" value="<?php echo dol_escape_htmltag($langfile); ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Computed value -->
|
<!-- Computed value -->
|
||||||
<?php if (empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?>
|
<?php if (empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?>
|
||||||
<tr class="extra_computed_value"><td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?></td><td class="valeur"><input id="computed_value" class="quatrevingtpercent" type="text" name="computed_value" value="<?php echo dol_escape_htmltag($computed); ?>"></td></tr>
|
<tr class="extra_computed_value"><td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?></td><td class="valeur"><input id="computed_value" class="quatrevingtpercent" type="text" name="computed_value" value="<?php echo dol_escape_htmltag($computed); ?>"></td></tr>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<tr class="extra_computed_value"><td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?></td><td class="valeur"><input id="computed_value" class="quatrevingtpercent" type="text" name="computed_value" value="<?php echo dol_escape_htmltag($computed); ?>"></td></tr>
|
<tr class="extra_computed_value"><td><?php echo $form->textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?></td><td class="valeur"><input id="computed_value" class="quatrevingtpercent" type="text" name="computed_value" value="<?php echo dol_escape_htmltag($computed); ?>"></td></tr>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<!-- Default Value (at sql setup level) -->
|
<!-- Default Value (at sql setup level) -->
|
||||||
<tr class="extra_default_value"><td><?php echo $langs->trans("DefaultValue").' ('.$langs->trans("Database").')'; ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo dol_escape_htmltag($default); ?>"></td></tr>
|
<tr class="extra_default_value"><td><?php echo $langs->trans("DefaultValue").' ('.$langs->trans("Database").')'; ?></td><td class="valeur"><input id="default_value" type="text" name="default_value" size="5" value="<?php echo dol_escape_htmltag($default); ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Unique -->
|
<!-- Unique -->
|
||||||
<tr class="extra_unique"><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique"<?php echo ($unique ? ' checked' : ''); ?>></td></tr>
|
<tr class="extra_unique"><td><?php echo $langs->trans("Unique"); ?></td><td class="valeur"><input id="unique" type="checkbox" name="unique"<?php echo ($unique ? ' checked' : ''); ?>></td></tr>
|
||||||
|
|
||||||
<!-- Required -->
|
<!-- Required -->
|
||||||
<tr class="extra_required"><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo ($required ? ' checked' : ''); ?>></td></tr>
|
<tr class="extra_required"><td><?php echo $langs->trans("Required"); ?></td><td class="valeur"><input id="required" type="checkbox" name="required"<?php echo ($required ? ' checked' : ''); ?>></td></tr>
|
||||||
|
|
||||||
<!-- Always editable -->
|
<!-- Always editable -->
|
||||||
<tr class="extra_alwayseditable"><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ($alwayseditable ? ' checked' : ''); ?>></td></tr>
|
<tr class="extra_alwayseditable"><td><?php echo $langs->trans("AlwaysEditable"); ?></td><td class="valeur"><input id="alwayseditable" type="checkbox" name="alwayseditable"<?php echo ($alwayseditable ? ' checked' : ''); ?>></td></tr>
|
||||||
|
|
||||||
<!-- Visibility -->
|
<!-- Visibility -->
|
||||||
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
|
<tr><td class="extra_list"><?php echo $form->textwithpicto($langs->trans("Visibility"), $langs->trans("VisibleDesc")); ?>
|
||||||
</td><td class="valeur"><input id="list" class="minwidth100" type="text" name="list" value="<?php echo ($list != '' ? $list : '1'); ?>"></td></tr>
|
</td><td class="valeur"><input id="list" class="minwidth100" type="text" name="list" value="<?php echo ($list != '' ? $list : '1'); ?>"></td></tr>
|
||||||
|
|
||||||
<!-- Visibility for PDF-->
|
<!-- Visibility for PDF-->
|
||||||
<tr><td class="extra_pdf"><?php echo $form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
|
<tr><td class="extra_pdf"><?php echo $form->textwithpicto($langs->trans("DisplayOnPdf"), $langs->trans("DisplayOnPdfDesc")); ?>
|
||||||
</td><td class="valeur"><input id="printable" class="minwidth100" type="text" name="printable" value="<?php echo dol_escape_htmltag($printable); ?>"></td></tr>
|
</td><td class="valeur"><input id="printable" class="minwidth100" type="text" name="printable" value="<?php echo dol_escape_htmltag($printable); ?>"></td></tr>
|
||||||
<tr class="extra_totalizable"><td><?php echo $form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?></td><td class="valeur"><input id="totalizable" type="checkbox" name="totalizable"<?php echo ($totalizable ? ' checked' : ''); ?>></td></tr>
|
<tr class="extra_totalizable"><td><?php echo $form->textwithpicto($langs->trans("Totalizable"), $langs->trans("TotalizableDesc")); ?></td><td class="valeur"><input id="totalizable" type="checkbox" name="totalizable"<?php echo ($totalizable ? ' checked' : ''); ?>></td></tr>
|
||||||
|
|
||||||
<!-- Help tooltip -->
|
<!-- Help tooltip -->
|
||||||
<tr class="help"><td><?php echo $form->textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?></td><td class="valeur"><input id="help" class="quatrevingtpercent" type="text" name="help" value="<?php echo dol_escape_htmltag($help); ?>"></td></tr>
|
<tr class="help"><td><?php echo $form->textwithpicto($langs->trans("HelpOnTooltip"), $langs->trans("HelpOnTooltipDesc")); ?></td><td class="valeur"><input id="help" class="quatrevingtpercent" type="text" name="help" value="<?php echo dol_escape_htmltag($help); ?>"></td></tr>
|
||||||
|
|
||||||
<?php if ($conf->multicompany->enabled) { ?>
|
<?php if ($conf->multicompany->enabled) { ?>
|
||||||
<!-- Multicompany entity -->
|
<!-- Multicompany entity -->
|
||||||
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (empty($entitycurrentorall) ? ' checked' : ''); ?>></td></tr>
|
<tr><td><?php echo $langs->trans("AllEntities"); ?></td><td class="valeur"><input id="entitycurrentorall" type="checkbox" name="entitycurrentorall"<?php echo (empty($entitycurrentorall) ? ' checked' : ''); ?>></td></tr>
|
||||||
|
|||||||
@ -409,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on
|
|||||||
MassConvert=Launch bulk conversion
|
MassConvert=Launch bulk conversion
|
||||||
PriceFormatInCurrentLanguage=Price Format In Current Language
|
PriceFormatInCurrentLanguage=Price Format In Current Language
|
||||||
String=String
|
String=String
|
||||||
|
String1Line=String (1 line)
|
||||||
TextLong=Long text
|
TextLong=Long text
|
||||||
|
TextLongNLines=Long text (n lines)
|
||||||
HtmlText=Html text
|
HtmlText=Html text
|
||||||
Int=Integer
|
Int=Integer
|
||||||
Float=Float
|
Float=Float
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user