Merged changes from stable branch up to 2.3.23.
[fa-stable.git] / includes / ui / ui_input.inc
index 4f02f9b26b8e4aa89504dc5f7c0dd58cf5306e5e..de9c11531be3627497f88f81a3ae2d6db0f89c11 100644 (file)
@@ -115,6 +115,7 @@ function hidden($name, $value=null, $echo=true)
                'cancel'  - cancel form entry on Escape press; dflt ICON_CANCEL
                'process' - displays progress bar during call; optional icon
                'nonajax' - ditto, non-ajax submit
+
        $atype can contain also multiply type selectors separated by space, 
        however make sense only combination of 'process' and one of defualt/selector/cancel
 */
@@ -387,7 +388,7 @@ function check_row($label, $name, $value=null, $submit_on_change=false, $title=f
 function radio($label, $name, $value, $selected=null, $submit_on_change=false)
 {
        if (!isset($selected))
-               $selected = get_post($name) == $value;
+               $selected = get_post($name) === (string)$value;
 
        if ($submit_on_change === true)
                $submit_on_change = 
@@ -606,7 +607,7 @@ function link_row_ex($label, $name, $size, $max=null, $title=null, $value=null,
 function date_cells($label, $name, $title = null, $check=null, $inc_days=0, 
        $inc_months=0, $inc_years=0, $params=null, $submit_on_change=false)
 {
-       global $use_date_picker, $path_to_root, $Ajax;
+       global $path_to_root, $Ajax;
 
        if (!isset($_POST[$name]) || $_POST[$name] == "")
        {
@@ -624,7 +625,7 @@ function date_cells($label, $name, $title = null, $check=null, $inc_days=0,
                        $_POST[$name] = $dd;
                }
        }
-       if ($use_date_picker)
+       if (user_use_date_picker())
        {
                $calc_image = (file_exists("$path_to_root/themes/".user_theme()."/images/cal.gif")) ? 
                        "$path_to_root/themes/".user_theme()."/images/cal.gif" : "$path_to_root/themes/default/images/cal.gif";
@@ -946,7 +947,7 @@ function supplier_credit_row($supplier, $credit, $parms='')
 function bank_balance_row($bank_acc, $parms='')
 {
        global $path_to_root;
-       
+
        $to = add_days(Today(), 1);
        $bal = get_balance_before_for_bank_account($bank_acc, $to);
        label_row( _("Bank Balance:"),
@@ -957,4 +958,3 @@ function bank_balance_row($bank_acc, $parms='')
                ."</a>", $parms);
 }
 
-?>
\ No newline at end of file