';
+ $value .= '';
} else {
$showsize = round((float) $size);
if ($showsize > 48) {
diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php
index 123ec9dcc1d..24e4d15e894 100644
--- a/htdocs/core/tpl/admin_extrafields_add.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php
@@ -107,6 +107,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php Contact:con
else if (type == 'point') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
else if (type == 'linestrg') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
else if (type == 'polygon') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
+ else if (type == 'stars') { size.val('5').removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
else if (type == 'separate') {
langfile.val('').prop('disabled',true);size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true);
jQuery("#value_choice").show();
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
index 215cefa9444..c1ee397732a 100644
--- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
@@ -103,6 +103,7 @@ $listofexamplesforlink = 'Societe:societe/class/societe.class.php Contact:con
else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpselect").show();}
else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helpchkbxlst").show();}
else if (type == 'link') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").show(); jQuery(".spanforparamtooltip").hide(); jQuery("#helplink").show();}
+ else if (type == 'stars') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();}
else if (type == 'separate') {
size.val('').prop('disabled', true); unique.removeAttr('checked').prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true);
jQuery("#value_choice").show();
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 46f1cb43fd1..913ee3b72ed 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -466,6 +466,7 @@ ExtrafieldPointGeo=Geometric Point
ExtrafieldMultiPointGeo=Geometric Multi Point
ExtrafieldLinestringGeo=Geometric Linestring
ExtrafieldPolygonGeo=Geometric Polygon
+ExtrafieldStars=Stars
ComputedFormula=Computed field
ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $objectoffield. WARNING: If you need properties of an object not loaded, just fetch yourself the object into your formula like in the second example. Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.
Example to reload object (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($objectoffield->id) > 0 ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1')
Other example of formula to force load of object and its parent object: (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($objectoffield->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found'
Computedpersistent=Store computed field
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index f98573a5bd9..02c07e6ca87 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -77,6 +77,7 @@ ErrorUploadBlockedByAddon=Upload blocked by a PHP/Apache plugin.
ErrorFileSizeTooLarge=File size is too large or file not provided.
ErrorFieldTooLong=Field %s is too long.
ErrorSizeTooLongForIntType=Size too long for int type (%s digits maximum)
+ErrorSizeForStarsType=The star size must be a number between 1 and 10
ErrorSizeTooLongForVarcharType=Size too long for string type (%s chars maximum)
ErrorNoValueForSelectType=Please fill value for select list
ErrorNoValueForCheckBoxType=Please fill value for checkbox list