Bug submitting forms in FA 2.3.x when checkbox field not changed. Fixed
[fa-stable.git] / includes / ui / ui_input.inc
index 0e58b36bc874d1411f8af7c42510fa7a3d45b69e..788767c403758e01601742583bbb96c1f812b38e 100644 (file)
@@ -334,7 +334,7 @@ function select_button_cell($name, $value, $title=false)
 
 function check_value($name)
 {
-       if (!isset($_POST[$name]))
+    if (!isset($_POST[$name]) || ($_POST[$name]+0) === 0)
                return 0;
        return 1;
 }
@@ -634,7 +634,7 @@ function date_cells($label, $name, $title = null, $check=null, $inc_days=0,
                $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";
                $post_label = "<a tabindex='-1' href=\"javascript:date_picker(document.getElementsByName('$name')[0]);\">"
-               . "     <img src='$calc_image' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
+               . "     <img src='$calc_image' style='vertical-align:middle;padding-bottom:4px;width:16px;height:16px;border:0;' alt='"._('Click Here to Pick up the date')."'></a>\n";
        }       
        else
                $post_label = "";