diff options
Diffstat (limited to 'views/installation/input/text.php')
-rw-r--r-- | views/installation/input/text.php | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/views/installation/input/text.php b/views/installation/input/text.php index 2caf547b6..ec8233461 100644 --- a/views/installation/input/text.php +++ b/views/installation/input/text.php @@ -3,17 +3,23 @@ * Elgg text input * Displays a text input field * - * * @uses $vars['value'] The current value, if any - * @uses $vars['name'] The name of the input field - * @uses $vars['disabled'] If true then control is read-only - * @uses $vars['class'] Class override + * @uses $vars['name'] The name of the input field + * @uses $vars['class'] CSS class + * @uses $vars['id'] CSS id */ -$class = $vars['class']; -if (!$class) { - $class = "input-text"; +if (isset($vars['class'])) { + $class = "class=\"{$vars['class']}\""; +} else { + $class = ""; +} + +if (isset($vars['id'])) { + $id = "id=\"{$vars['id']}\""; +} else { + $id = ''; } ?> -<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> name="<?php echo $vars['name']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/>
\ No newline at end of file +<input type="text" name="<?php echo $vars['name']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" <?php echo $class; ?> <?php echo $id; ?>/>
\ No newline at end of file |