Update PicoTools
This commit is contained in:
parent
c50275cd7d
commit
8cdb47b003
19
vendor/PicoTools/Helper.php
vendored
19
vendor/PicoTools/Helper.php
vendored
@ -164,6 +164,25 @@ function form_select($name, array $options, $values = array(), array $errors = a
|
||||
}
|
||||
|
||||
|
||||
function form_radios($name, array $options, array $values = array())
|
||||
{
|
||||
$html = '';
|
||||
|
||||
foreach ($options as $value => $label) {
|
||||
|
||||
$html .= form_radio($name, $label, $value, isset($values[$name]) && $values[$name] == $value);
|
||||
}
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
||||
function form_radio($name, $label, $value, $selected = false, $class = '')
|
||||
{
|
||||
return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.escape($value).'" '.($selected ? 'selected="selected"' : '').'>'.escape($label).'</label>';
|
||||
}
|
||||
|
||||
|
||||
function form_label($label, $name, $class = '')
|
||||
{
|
||||
return '<label for="form-'.$name.'" class="'.$class.'">'.escape($label).'</label>';
|
||||
|
12
vendor/PicoTools/Translator.php
vendored
12
vendor/PicoTools/Translator.php
vendored
@ -128,6 +128,18 @@ namespace {
|
||||
}
|
||||
|
||||
|
||||
function c() {
|
||||
|
||||
return call_user_func_array('\PicoTools\Translator\currency', func_get_args());
|
||||
}
|
||||
|
||||
|
||||
function n() {
|
||||
|
||||
return call_user_func_array('\PicoTools\Translator\number', func_get_args());
|
||||
}
|
||||
|
||||
|
||||
function dt() {
|
||||
|
||||
return call_user_func_array('\PicoTools\Translator\datetime', func_get_args());
|
||||
|
Loading…
Reference in New Issue
Block a user