Add web notifications

This commit is contained in:
Frederic Guillot
2015-10-03 12:09:27 -04:00
parent b5a2b8f9f7
commit d67d7c54e6
41 changed files with 1670 additions and 567 deletions

View File

@@ -103,6 +103,26 @@ class Form extends \Core\Base
return '<label><input type="radio" name="'.$name.'" class="'.$class.'" value="'.$this->helper->e($value).'" '.($selected ? 'checked="checked"' : '').'> '.$this->helper->e($label).'</label>';
}
/**
* Display a checkboxes group
*
* @access public
* @param string $name Field name
* @param array $options Options
* @param array $values Form values
* @return string
*/
public function checkboxes($name, array $options, array $values = array())
{
$html = '';
foreach ($options as $value => $label) {
$html .= $this->checkbox($name.'['.$value.']', $label, $value, isset($values[$name]) && in_array($value, $values[$name]));
}
return $html;
}
/**
* Display a checkbox field
*