diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php
index e7f5837ac12..5b04cb43846 100644
--- a/htdocs/core/class/html.formother.class.php
+++ b/htdocs/core/class/html.formother.class.php
@@ -450,6 +450,21 @@ class FormOther
}
}
+ /**
+ * Output a HTML code to select a color
+ *
+ * @param string $set_color Pre-selected color
+ * @param string $prefix Name of HTML field
+ * @param string $form_name Name of form
+ * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code
+ * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
+ * @return void
+ */
+ function select_color($set_color='', $prefix='f_color', $form_name='objForm', $showcolorbox=1, $arrayofcolors='')
+ {
+ print selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors);
+ }
+
/**
* Output a HTML code to select a color
*
@@ -460,15 +475,18 @@ class FormOther
* @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813')
* @return void
*/
- function select_color($set_color='', $prefix='f_color', $form_name='objForm', $showcolorbox=1, $arrayofcolors='')
+ function selectColor($set_color='', $prefix='f_color', $form_name='objForm', $showcolorbox=1, $arrayofcolors='')
{
global $langs;
+
+ $out='';
+
if (! is_array($arrayofcolors) || count($arrayofcolors) < 1)
{
$langs->load("other");
- print '';
- print '';
- print '';
+ $out.= '';
- print '';
+ $out.= '';
}
else // In most cases, this is not used. We used instead function with no specific list of colors
{
- print '';
- print '';
- print '';
+ $out.= '';
- print '';
}
+
+ return $out;
}
/**