aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 06:30:06 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-20 06:30:06 +0000
commit01885737378a9e430de23ca30eca6430583e86d7 (patch)
treec2a1c6cdb492d614d9c9940d29d7bd10d768b3a2 /views/default
parent70faa7d64b3d992e6909019a2023ac5a62ab8b41 (diff)
downloadelgg-01885737378a9e430de23ca30eca6430583e86d7.tar.gz
elgg-01885737378a9e430de23ca30eca6430583e86d7.tar.bz2
Refs #2143: DRY up input/email
git-svn-id: http://code.elgg.org/elgg/trunk@7358 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/input/email.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/views/default/input/email.php b/views/default/input/email.php
index efe2c5848..81e617476 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -5,24 +5,18 @@
*
* @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['internalname'] The name of the input field
- *
*/
-$class = $vars['class'];
-if (!$class) {
- $class = "input_text";
-}
+$defaults = array(
+ 'class' => 'input_text', //@todo input_email?
+ 'disabled' => FALSE,
+);
+
+$vars = array_merge($defaults, $vars);
if (!isset($vars['value']) || $vars['value'] === FALSE) {
$vars['value'] = elgg_get_sticky_value($vars['internalname']);
}
-
?>
-<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
+<input type="text" <?php echo elgg_format_attributes($vars); ?> /> \ No newline at end of file