aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/email.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/email.php')
-rw-r--r--views/default/input/email.php44
1 files changed, 23 insertions, 21 deletions
diff --git a/views/default/input/email.php b/views/default/input/email.php
index 75d7eec39..190fb88c6 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -1,24 +1,26 @@
-<?php
-
- /**
- * Elgg email input
- * Displays an email input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
+/**
+ * Elgg email input
+ * Displays an email input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['class'] Additional CSS class
+ */
- * @author Curverider Ltd
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-email {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-email";
+}
- * @link http://elgg.org/
- *
- * @uses $vars['value'] The current value, if any
- * @uses $vars['js'] Any Javascript to enter into the input tag
- * @uses $vars['internalname'] The name of the input field
- *
- */
+$defaults = array(
+ 'disabled' => false,
+);
- $class = $vars['class'];
- if (!$class) $class = "input-text";
-?>
-
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> \ No newline at end of file
+$vars = array_merge($defaults, $vars);
+
+?>
+
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file