blob: 378eae6fdcdb2da93733310bee2ab826b84653ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<?php
/**
* Elgg checkbox input
* Displays a checkbox input tag
*
* @uses $var['name']
* @uses $vars['value']
* @uses $vars['id']
* @uses $vars['class']
*/
if (isset($vars['id'])) {
$id = "id=\"{$vars['id']}\"";
} else {
$id = '';
}
if (isset($vars['class'])) {
$id = "class=\"{$vars['class']}\"";
} else {
$id = '';
}
if (!isset($vars['value'])) {
$vars['value'] = $vars['name'];
}
?>
<input type="checkbox" <?php echo $id; ?> <?php echo $class; ?> name="<?php echo $vars['name']; ?>" value="<?php echo $vars['value']; ?>" />
|