Added trans_editor_link helper.
[fa-stable.git] / includes / ui / ui_input.inc
index a6537a83c8bd2a06ae407c980154ecaf1a6f3a6a..b3cb79b17d024c7fbe5c487910f605cc3cb3c5a6 100644 (file)
@@ -606,7 +606,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 +624,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";
@@ -943,26 +943,6 @@ function supplier_credit_row($supplier, $credit, $parms='')
                ."</a>", $parms);
 }
 
-/*
-       Edit transaction link to be used in transaction inquires
-*/
-function edit_trans_link($trans_type, $trans_no, $url='')
-{
-       global $path_to_root, $trans_editors;
-
-       if (!$url) $url = @$trans_editors[$trans_type];
-
-       if (!$trans_no || !$url)
-               return '';
-
-       if (is_closed_trans($trans_type, $trans_no)) {
-               return set_icon(ICON_CLOSED, _('Closed'));
-       } else {
-               $link_text = user_graphic_links() ? set_icon(ICON_EDIT, _('Edit')) : _('Edit');
-               return "<a href='".$path_to_root . sprintf($url, $trans_no, $trans_type)."'>$link_text</a>";
-       }
-}
-
 function bank_balance_row($bank_acc, $parms='')
 {
        global $path_to_root;
@@ -977,4 +957,3 @@ function bank_balance_row($bank_acc, $parms='')
                ."</a>", $parms);
 }
 
-?>
\ No newline at end of file