When no_item_list or no_customer_list or no_supplier_list was checked in company...
[fa-stable.git] / includes / ui / ui_controls.inc
index 8e815e73473415518e422cf686fca027e91a47f5..7d731525509af37f3f835a32ddf2d380ea5d99cf 100644 (file)
@@ -19,6 +19,7 @@ function start_form($multi=false, $sid=false, $action="", $name="")
                echo "<form enctype='multipart/form-data' method='post' action='$action' $name>\n";     
        else
                echo "<form method='post' action='$action' $name>\n";   
+
 }
 
 //---------------------------------------------------------------------------------
@@ -27,6 +28,7 @@ function end_form($breaks=0)
 {
        if ($breaks)
                br($breaks);
+       echo "<input type=\"hidden\" name=\"_focus\" value=\"".$_POST['_focus']."\">\n";
        echo "</form>\n";
 }
 
@@ -103,9 +105,13 @@ function hyperlink_params_td($target, $label, $params)
 
 //-----------------------------------------------------------------------------------
 
-function hyperlink_params_separate($target, $label, $params)
+function hyperlink_params_separate($target, $label, $params, $center=false)
 {
+       if ($center)
+               echo "<br><center>";
        echo "<a target='_blank' href='$target?$params" . SID . "'>$label</a>\n";
+       if ($center)
+               echo "</center>";
 }
 
 function hyperlink_params_separate_td($target, $label, $params)
@@ -154,6 +160,11 @@ function delete_link_cell($param)
        label_cell("<a href='" . $_SERVER['PHP_SELF']. "?" . "$param'>" . _("Delete") . "</a>", "nowrap");
 }
 
+function edit_button_cell($name, $value)
+{
+    label_cell("<input type=\"submit\" class=\"editbutton\" name=\"$name\" value=\"$value\" />\n");
+}
+
 //-----------------------------------------------------------------------------------
 
 function start_row($param="")