Added submit_on_change option for date fields.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 21 Sep 2008 14:51:08 +0000 (14:51 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 21 Sep 2008 14:51:08 +0000 (14:51 +0000)
includes/ui/ui_input.inc

index a4f8c5e1d2550a70702cf0992cab8e33bb15d7dc..3c2151bc34a531eded03040b72e95b7576123300 100644 (file)
@@ -399,7 +399,8 @@ function text_row_ex($label, $name, $size, $max=null, $title=null, $value=null,
 
 //-----------------------------------------------------------------------------------
 
-function date_cells($label, $name, $title = null, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
+function date_cells($label, $name, $title = null, $init=null, $inc_days=0, 
+       $inc_months=0, $inc_years=0, $params=null, $submit_on_change=false)
 {
        global $use_date_picker, $path_to_root;
        if (!isset($_POST[$name]) || $_POST[$name] == "")
@@ -428,13 +429,15 @@ function date_cells($label, $name, $title = null, $init=null, $inc_days=0, $inc_
                . "     <img src='$path_to_root/themes/default/images/cal.gif' width='16' height='16' border='0' alt='"._('Click Here to Pick up the date')."'></a>\n";
        else
                $post_label = "";
-       text_cells_ex($label, $name, 9, 12, $_POST[$name], $title, $params, $post_label);
+       text_cells_ex($label, $name, 9, 12, $_POST[$name], $title, $params, $post_label, $submit_on_change);
 }
 
-function date_row($label, $name, $title=null, $init=null, $inc_days=0, $inc_months=0, $inc_years=0, $params=null)
+function date_row($label, $name, $title=null, $init=null, $inc_days=0, $inc_months=0, 
+       $inc_years=0, $params=null, $submit_on_change=false)
 {
        echo "<tr>";
-       date_cells($label, $name, $title, $init, $inc_days, $inc_months, $inc_years, $params);
+       date_cells($label, $name, $title, $init, $inc_days, $inc_months, 
+               $inc_years, $params, $submit_on_change);
        echo "</tr>\n";
 }