Can set language file to use for label key of extra field
This commit is contained in:
parent
502ac19a0a
commit
76b4a2ce06
@ -158,12 +158,11 @@ if ($action == 'add')
|
||||
$params['options'][$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$result=$extrafields->addExtraField(
|
||||
GETPOST('attrname', 'alpha'),
|
||||
GETPOST('label', 'alpha'),
|
||||
$type,
|
||||
GETPOST('pos', 'alpha'),
|
||||
GETPOST('pos', 'int'),
|
||||
$extrasize,
|
||||
$elementtype,
|
||||
(GETPOST('unique', 'alpha')?1:0),
|
||||
@ -175,8 +174,8 @@ if ($action == 'add')
|
||||
(GETPOST('list', 'alpha')?1:0),
|
||||
(GETPOST('ishidden', 'alpha')?1:0),
|
||||
GETPOST('computed_value','alpha'),
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:'')
|
||||
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:''),
|
||||
GETPOST('langfile', 'alpha')
|
||||
);
|
||||
if ($result > 0)
|
||||
{
|
||||
@ -338,7 +337,8 @@ if ($action == 'update')
|
||||
(GETPOST('ishidden', 'alpha')?1:0),
|
||||
GETPOST('default_value','alpha'),
|
||||
GETPOST('computed_value','alpha'),
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:'')
|
||||
(GETPOST('entitycurrentorall', 'alpha')?0:''),
|
||||
GETPOST('langfile')
|
||||
);
|
||||
if ($result > 0)
|
||||
{
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2010-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2010-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
*
|
||||
@ -158,7 +158,9 @@
|
||||
</td>
|
||||
</tr>
|
||||
<!-- Position -->
|
||||
<tr><td class="titlefield"><?php echo $langs->trans("Position"); ?></td><td class="valeur"><input type="text" name="pos" size="5" value="<?php echo GETPOST('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 GETPOST('pos','int'); ?>"></td></tr>
|
||||
<!-- 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(GETPOST('langfile','alpha')); ?>"></td></tr>
|
||||
<!-- Computed Value -->
|
||||
<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" type="text" name="computed_value" class="quatrevingtpercent" value="<?php echo (GETPOST('"computed_value"')?GETPOST('"computed_value"'):''); ?>"></td></tr>
|
||||
<!-- Default Value (at sql setup level) -->
|
||||
|
||||
@ -129,23 +129,20 @@
|
||||
<table summary="listofattributes" class="border centpercent">
|
||||
|
||||
<?php
|
||||
$type=$extrafields->attribute_type[$attrname];
|
||||
$size=$extrafields->attribute_size[$attrname];
|
||||
$computed=$extrafields->attribute_computed[$attrname];
|
||||
$default=$extrafields->attribute_default[$attrname];
|
||||
$unique=$extrafields->attribute_unique[$attrname];
|
||||
$required=$extrafields->attribute_required[$attrname];
|
||||
$pos=$extrafields->attribute_pos[$attrname];
|
||||
$alwayseditable=$extrafields->attribute_alwayseditable[$attrname];
|
||||
$param=$extrafields->attribute_param[$attrname];
|
||||
$perms=$extrafields->attribute_perms[$attrname];
|
||||
$list=$extrafields->attribute_list[$attrname];
|
||||
if (! empty($conf->global->MAIN_CAN_HIDE_EXTRAFIELDS)) {
|
||||
$ishidden=$extrafields->attribute_hidden[$attrname];
|
||||
}
|
||||
if ($conf->multicompany->enabled) {
|
||||
$entitycurrentorall=$extrafields->attribute_entityid[$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];
|
||||
$ishidden=$extrafields->attributes[$elementtype]['hidden'][$attrname];
|
||||
$entitycurrentorall=$extrafields->attributes[$elementtype]['entityid'][$attrname];
|
||||
|
||||
if((($type == 'select') || ($type == 'checkbox') || ($type == 'radio')) && is_array($param))
|
||||
{
|
||||
@ -220,7 +217,9 @@ else
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 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($extrafields->attribute_pos[$attrname]); ?>"></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 -->
|
||||
<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 -->
|
||||
<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>
|
||||
<!-- Default value -->
|
||||
|
||||
@ -345,6 +345,7 @@ AddCRIfTooLong=There is no automatic wrapping, so if line is out of page on docu
|
||||
ConfirmPurge=Are you sure you want to execute this purge?<br>This will delete definitely all your data files with no way to restore them (ECM files, attached files...).
|
||||
MinLength=Minimum length
|
||||
LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory
|
||||
LanguageFile=Language file
|
||||
ExamplesWithCurrentSetup=Examples with current running setup
|
||||
ListOfDirectories=List of OpenDocument templates directories
|
||||
ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.<br><br>Put here full path of directories.<br>Add a carriage return between eah directory.<br>To add a directory of the GED module, add here <b>DOL_DATA_ROOT/ecm/yourdirectoryname</b>.<br><br>Files in those directories must end with <b>.odt</b> or <b>.ods</b>.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user