X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fui%2Fui_input.inc;h=dcd7fe68e0f71438800f8697dafae3be1839572d;hb=3218c355d9455506febbd3a8a7d9bd61fc9a0a34;hp=dbcdee67de47e2568a181bec8cc6d56d9f7e451d;hpb=8adc648cb5a861b42bd32d0ceae4cfd808b0d12c;p=fa-stable.git diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index dbcdee67..dcd7fe68 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -314,7 +314,7 @@ function button($name, $value, $title=false, $icon=false, $aspect='') } else return "'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B' + .html_specials_encode(strtr($name, array('.'=>'=2E', '='=>'=3D',// ' '=>'=20','['=>'=5B' ))) ."' value='$value'" .($title ? " title='$title'":'') @@ -348,7 +348,13 @@ function select_button_cell($name, $value, $title=false) function check_value($name) { - return (empty($_POST[$name]) ? 0 : 1); + if (is_array($name)) { + $ret = array(); + foreach($name as $key) + $ret[$key] = check_value($key); + return $ret; + } else + return (empty($_POST[$name]) ? 0 : 1); } function checkbox($label, $name, $value=null, $submit_on_change=false, $title=false) @@ -690,7 +696,7 @@ function date_row($label, $name, $title=null, $check=null, $inc_days=0, $inc_mon function password_row($label, $name, $value) { echo "$label"; - label_cell(""); + label_cell(""); echo "\n"; } @@ -905,7 +911,7 @@ function small_qty_cells($label, $name, $init=null, $params=null, $post_label=nu //----------------------------------------------------------------------------------- -function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $params="") +function textarea_cells($label, $name, $value, $cols, $rows, $max=255, $title = null, $params="") { global $Ajax; @@ -916,14 +922,15 @@ function textarea_cells($label, $name, $value, $cols, $rows, $title = null, $par $value = (!isset($_POST[$name]) ? "" : $_POST[$name]); echo "\n"; $Ajax->addUpdate($name, $name, $value); } -function textarea_row($label, $name, $value, $cols, $rows, $title=null, $params="") +function textarea_row($label, $name, $value, $cols, $rows, $max=255, $title=null, $params="") { echo "$label"; - textarea_cells(null, $name, $value, $cols, $rows, $title, $params); + textarea_cells(null, $name, $value, $cols, $rows, $max, $title, $params); echo "\n"; } @@ -1005,7 +1012,7 @@ function bank_balance_row($bank_acc, $parms='') $bal = get_balance_before_for_bank_account($bank_acc, $to); label_row( _("Bank Balance:"), " " . price_format($bal) ."", $parms);