blob: 5616056f4c68e9781cccffd33a01791f4fda65ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<?php
namespace Studip\Forms;
class CheckboxInput extends Input
{
public function getValue()
{
return $this->value ? true : false;
}
public function render()
{
$template = $GLOBALS['template_factory']->open('forms/checkbox_input');
$template->title = $this->title;
$template->name = $this->name;
$template->value = $this->value;
$template->id = md5(uniqid());
$template->required = $this->required;
$template->attributes = arrayToHtmlAttributes($this->attributes);
return $template->render();
}
}
|