mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
apply patch to initial html_radios function
This commit is contained in:
@@ -6,11 +6,11 @@
|
|||||||
* Type: function
|
* Type: function
|
||||||
* Name: html_radios
|
* Name: html_radios
|
||||||
* Purpose: Prints the list of <input type="radio" tags generated from the passed parameters
|
* Purpose: Prints the list of <input type="radio" tags generated from the passed parameters
|
||||||
* Parameters: name [required]- string
|
* Parameters: name [optional]- string default "radio"
|
||||||
* checked [optional]- string
|
* checked [optional]- string default not set
|
||||||
* values [required] - array
|
* values [required] - array
|
||||||
* separator[optional] - ie <br> or
|
* separator[optional] - ie <br> or
|
||||||
* output[optional] -without this one the buttons don't have names
|
* output[optional] - without this one the buttons don't have names
|
||||||
* Author: Christopher Kvarme <christopher.kvarme@flashjab.com>
|
* Author: Christopher Kvarme <christopher.kvarme@flashjab.com>
|
||||||
* ---------------------------------------------------------------------------------------------
|
* ---------------------------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@@ -19,7 +19,9 @@ function smarty_function_html_radios($params, &$smarty)
|
|||||||
extract($params);
|
extract($params);
|
||||||
|
|
||||||
$html_result = '';
|
$html_result = '';
|
||||||
|
if(!isset($name)){
|
||||||
|
$name = "radio";
|
||||||
|
}
|
||||||
settype($checked, 'array');
|
settype($checked, 'array');
|
||||||
if (isset($radios)) {
|
if (isset($radios)) {
|
||||||
settype($radios, 'array');
|
settype($radios, 'array');
|
||||||
|
Reference in New Issue
Block a user