2010-06-23 Sergio Martin <sergio.martin@artica.es>
* include/functions_html.php: Added a parameter into print_select function to set style a selective options into the select form control git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2921 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
f4efe80f28
commit
fdf807d633
|
@ -1,3 +1,9 @@
|
||||||
|
2010-06-23 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/functions_html.php: Added a parameter into
|
||||||
|
print_select function to set style a selective
|
||||||
|
options into the select form control
|
||||||
|
|
||||||
2010-06-23 Sergio Martin <sergio.martin@artica.es>
|
2010-06-23 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* include/auth/mysql.php
|
* include/auth/mysql.php
|
||||||
|
|
|
@ -160,7 +160,7 @@ function print_select_style ($fields, $name, $selected = '', $style='', $script
|
||||||
* @return string HTML code if return parameter is true.
|
* @return string HTML code if return parameter is true.
|
||||||
*/
|
*/
|
||||||
function print_select ($fields, $name, $selected = '', $script = '', $nothing = '', $nothing_value = 0, $return = false,
|
function print_select ($fields, $name, $selected = '', $script = '', $nothing = '', $nothing_value = 0, $return = false,
|
||||||
$multiple = false, $sort = true, $class = '', $disabled = false, $style = false) {
|
$multiple = false, $sort = true, $class = '', $disabled = false, $style = false, $option_style = false) {
|
||||||
|
|
||||||
$output = "\n";
|
$output = "\n";
|
||||||
|
|
||||||
|
@ -224,6 +224,9 @@ function print_select ($fields, $name, $selected = '', $script = '', $nothing =
|
||||||
//Needs type comparison otherwise if $selected = 0 and $value = "string" this would evaluate to true
|
//Needs type comparison otherwise if $selected = 0 and $value = "string" this would evaluate to true
|
||||||
$output .= ' selected="selected"';
|
$output .= ' selected="selected"';
|
||||||
}
|
}
|
||||||
|
if (is_array ($option_style) && in_array ($value, array_keys($option_style))) {
|
||||||
|
$output .= ' style="'.$option_style[$value].'"';
|
||||||
|
}
|
||||||
if ($label === '') {
|
if ($label === '') {
|
||||||
$output .= '>'.$value."</option>";
|
$output .= '>'.$value."</option>";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue