From: Janusz Dobrowolski Date: Thu, 25 Feb 2010 21:12:39 +0000 (+0000) Subject: Added radio buttons helper X-Git-Tag: v2.4.2~19^2~948 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b943587a48e2932aed12af1695af24095244eba8;p=fa-stable.git Added radio buttons helper --- diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc index 13d39e63..d963665f 100644 --- a/includes/ui/ui_input.inc +++ b/includes/ui/ui_input.inc @@ -362,7 +362,18 @@ function check_row($label, $name, $value=null, $submit_on_change=false, $title=f } //----------------------------------------------------------------------------------- +function radio($label, $name, $value, $selected, $submit_on_change=false) { + if ($submit_on_change === true) + $submit_on_change = + "JsHttpRequest.request(\"_{$name}_update\", this.form);"; + + return "".($label ? $label : ''); +} + +//----------------------------------------------------------------------------------- function labelheader_cell($label, $params="") { echo "$label\n";