From 8f5772176b209e19c73078ed92483f18dede93a4 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Mon, 18 Feb 2008 00:47:18 +0000 Subject: [PATCH] Added 2 functions in ui_input.inc, button and button_cell --- CHANGELOG.txt | 2 ++ includes/ui/ui_input.inc | 14 ++++++++++++++ reporting/includes/reporting.inc | 5 +++-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 9068c38e..7a0d12df 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -29,6 +29,8 @@ $ /reporting/includes/reporting.inc $ /sql/alter.sql /taxes/tax_types.php /taxes/db/tax_types_db.inc ++ Added 2 functions in ui_input.inc, button and button_cell + /includes/ui/ui_input.inc 11-Feb-2008 Joe Hunt + Added file, update_db.php, for updating company databases from an SQL script. diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index fdb55200..7e122c3b 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -87,6 +87,20 @@ function submit_row($name, $value, $right=true, $extra="") submit_cells($name, $value, $extra); echo "\n"; } +//--------------------------------------------------------------------------------- + +function button($name, $value, $onclick) +{ + echo "\n"; +} + +function button_cell($name, $value, $onclick) +{ + echo ""; + button($name, $value, $onclick); + echo "\n"; +} + //----------------------------------------------------------------------------------- function check_value($name) diff --git a/reporting/includes/reporting.inc b/reporting/includes/reporting.inc index c3fbc5bd..183b5974 100644 --- a/reporting/includes/reporting.inc +++ b/reporting/includes/reporting.inc @@ -75,8 +75,9 @@ function printDocument(docno) { // Ex. label_cell(print_document_link($myrow['order_no'], _("Print"))); // or display_note(print_document_link($order_no, _("Print this order"))); // or if a button -// echo "\n"; +// button("button", _("Print this order"), print_document_link($order_no, "", false))"; +// or if a button inside a TD +// button_cell("button", _("Print this order"), print_document_link($order_no, "", false))"; function print_document_link($doc_no, $link_text, $link=true) { -- 2.30.2