diff options
Diffstat (limited to 'views/installation/input/text.php')
| -rw-r--r-- | views/installation/input/text.php | 27 | 
1 files changed, 14 insertions, 13 deletions
| diff --git a/views/installation/input/text.php b/views/installation/input/text.php index c59278b40..ec8233461 100644 --- a/views/installation/input/text.php +++ b/views/installation/input/text.php @@ -3,22 +3,23 @@   * Elgg text input   * Displays a text input field   * - * @package Elgg - * @subpackage Core - - - *   * @uses $vars['value'] The current value, if any - * @uses $vars['js'] Any Javascript to enter into the input tag - * @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" '; ?> <?php echo $vars['js']; ?> 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 | 
