blob: 29a37dd553d2c777b9eaba1bd47eaa5e822dbc43 (
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
31
32
33
|
<?php
/**
* Create a input button
*
* @uses $vars['value'] The current value, if any
* @uses $vars['name'] The name of the input field
* @uses $vars['type'] submit or button.
*/
$class = $vars['class'];
if (!$class) {
$class = "elgg-button-submit";
}
if (isset($vars['type'])) {
$type = strtolower($vars['type']);
} else {
$type = 'submit';
}
switch ($type) {
case 'button' :
$type='button';
break;
case 'submit':
default:
$type = 'submit';
}
$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
$name = $vars['name'];
?>
<input type="<?php echo $type; ?>" <?php if (isset($vars['id'])) echo "id=\"{$vars['id']}\"";?> value="<?php echo $value; ?>" class="<?php echo $class; ?>" />
|