mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
html_options passthru all unknown paramters now
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,3 +1,4 @@
|
|||||||
|
- html_options passthru all unknown paramters now
|
||||||
- fix link functionality of html_image, also make
|
- fix link functionality of html_image, also make
|
||||||
output XHTML compatible (Hinrich Donner, Monte)
|
output XHTML compatible (Hinrich Donner, Monte)
|
||||||
- append "@" to default modifier vars/args
|
- append "@" to default modifier vars/args
|
||||||
|
@@ -35,8 +35,17 @@ function smarty_function_html_options($params, &$smarty)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* passthru all unknown params to $extra */
|
||||||
|
$extra = '';
|
||||||
|
unset($params['values']);
|
||||||
|
unset($params['output']);
|
||||||
|
unset($params['selected']);
|
||||||
|
unset($params['options']);
|
||||||
|
unset($params['name']);
|
||||||
|
foreach ($params as $key=>$value) $extra .= ' ' . $key . '="'. htmlspecialchars($value) . '"';
|
||||||
|
|
||||||
if(!empty($name)) {
|
if(!empty($name)) {
|
||||||
$html_result = '<select name="' . $name . '">' . "\n" . $html_result . '</select>' . "\n";
|
$html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $html_result . '</select>' . "\n";
|
||||||
}
|
}
|
||||||
return $html_result;
|
return $html_result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user