forked from Wavyzz/dolibarr
Fix label-picto of extrafields
This commit is contained in:
@@ -90,9 +90,9 @@ class ExtraFields
|
||||
'ip' => 'ExtrafieldIP',
|
||||
'icon' => 'Icon',
|
||||
'password' => 'ExtrafieldPassword',
|
||||
'radio' => 'ExtrafieldRadio',
|
||||
'select' => 'ExtrafieldSelect',
|
||||
'sellist' => 'ExtrafieldSelectList',
|
||||
'radio' => 'ExtrafieldRadio',
|
||||
'checkbox' => 'ExtrafieldCheckBox',
|
||||
'chkbxlst' => 'ExtrafieldCheckBoxFromList',
|
||||
'link' => 'ExtrafieldLink',
|
||||
@@ -2584,23 +2584,24 @@ class ExtraFields
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$arraytype2label = array('');
|
||||
|
||||
$tmptype2label = ExtraFields::$type2label;
|
||||
$type2label = array('');
|
||||
foreach ($tmptype2label as $key => $val) {
|
||||
$type2label[$key] = $langs->transnoentitiesnoconv($val);
|
||||
$arraytype2label[$key] = $langs->transnoentitiesnoconv($val);
|
||||
}
|
||||
|
||||
if (!getDolGlobalString('MAIN_USE_EXTRAFIELDS_ICON')) {
|
||||
unset($type2label['icon']);
|
||||
unset($arraytype2label['icon']);
|
||||
}
|
||||
if (!getDolGlobalString('MAIN_USE_GEOPHP')) {
|
||||
unset($type2label['point']);
|
||||
unset($type2label['multipts']);
|
||||
unset($type2label['linestrg']);
|
||||
unset($type2label['polygon']);
|
||||
unset($arraytype2label['point']);
|
||||
unset($arraytype2label['multipts']);
|
||||
unset($arraytype2label['linestrg']);
|
||||
unset($arraytype2label['polygon']);
|
||||
}
|
||||
|
||||
return $type2label;
|
||||
return $arraytype2label;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4761,8 +4761,8 @@ function getPictoForType($key, $morecss = '')
|
||||
'select' => 'list',
|
||||
'sellist' => 'list',
|
||||
'radio' => 'check-circle',
|
||||
'checkbox' => 'check-square',
|
||||
'chkbxlst' => 'check-square',
|
||||
'checkbox' => 'list',
|
||||
'chkbxlst' => 'list',
|
||||
'link' => 'link',
|
||||
'icon' => "question",
|
||||
'point' => "country",
|
||||
|
||||
@@ -223,7 +223,8 @@ if (in_array($type, array_keys($typewecanchangeinto))) {
|
||||
}
|
||||
print $formadmin->selectTypeOfFields('type', GETPOST('type', 'alpha') ? GETPOST('type', 'alpha') : $type, $typewecanchangeinto);
|
||||
} else {
|
||||
print getPictoForType($type).$type2label[$type];
|
||||
print getPictoForType($type);
|
||||
print $type2label[$type];
|
||||
print '<input type="hidden" name="type" id="type" value="'.$type.'">';
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -452,13 +452,13 @@ ExtrafieldPriceWithCurrency=Price with currency
|
||||
ExtrafieldMail = Email
|
||||
ExtrafieldUrl = Url
|
||||
ExtrafieldIP = IP
|
||||
ExtrafieldSelect = Select list
|
||||
ExtrafieldSelectList = Select from table
|
||||
ExtrafieldSelect=Select list
|
||||
ExtrafieldSelectList=Select from table
|
||||
ExtrafieldSeparator=Separator (not a field)
|
||||
ExtrafieldPassword=Password
|
||||
ExtrafieldRadio=Radio buttons (one choice only)
|
||||
ExtrafieldCheckBox=Checkboxes
|
||||
ExtrafieldCheckBoxFromList=Checkboxes from table
|
||||
ExtrafieldRadio=Radio buttons (1 choice only)
|
||||
ExtrafieldCheckBox=Select list (n choices)
|
||||
ExtrafieldCheckBoxFromList=Select from table (n choices)
|
||||
ExtrafieldLink=Link to an object
|
||||
ExtrafieldPointGeo=Geometric Point
|
||||
ExtrafieldMultiPointGeo=Geometric Multi Point
|
||||
@@ -472,8 +472,8 @@ ExtrafieldParamHelpPassword=Leaving this field blank means this value will be st
|
||||
ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>code3,value3<br>...<br><br>In order to have the list depending on another complementary attribute list:<br>1,value1|options_<i>parent_list_code</i>:parent_key<br>2,value2|options_<i>parent_list_code</i>:parent_key <br><br>In order to have the list depending on another list:<br>1,value1|<i>parent_list_code</i>:parent_key<br>2,value2|<i>parent_list_code</i>:parent_key
|
||||
ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>...
|
||||
ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')<br><br> for example: <br>1,value1<br>2,value2<br>3,value3<br>...
|
||||
ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarily a primary int key<br>- filtersql is a SQL condition. It can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
|
||||
ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1) to display only active value<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
|
||||
ExtrafieldParamHelpsellist=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>- id_field is necessarily a primary int key<br>- filtersql is a condition. It must use the USF syntax. Example: (active:=:1) to display only active value<br>You can also use $ID$ in filter which is the current id of current object<br>If you want to filter on extrafields use syntax extra.fieldcode=... (where fieldcode is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
|
||||
ExtrafieldParamHelpchkbxlst=List of values comes from a table<br>Syntax: table_name:label_field:id_field::filtersql<br>Example: c_typent:libelle:id::filtersql<br><br>filter can be a simple test (eg active=1 to display only active value)<br>You can also use $ID$ in filter witch is the current id of current object<br>To do a SELECT in filter use $SEL$<br>if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another complementary attribute list:<br>c_typent:libelle:id:options_<i>parent_list_code</i>|parent_column:filter <br><br>In order to have the list depending on another list:<br>c_typent:libelle:id:<i>parent_list_code</i>|parent_column:filter
|
||||
ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath<br>Syntax: ObjectName:Classpath
|
||||
ExtrafieldParamHelpSeparator=Keep empty for a simple separator<br>Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)<br>Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session)
|
||||
LibraryToBuildPDF=Library used for PDF generation
|
||||
|
||||
Reference in New Issue
Block a user