aboutsummaryrefslogtreecommitdiff
path: root/views/default/input/password.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/default/input/password.php')
-rw-r--r--views/default/input/password.php50
1 files changed, 28 insertions, 22 deletions
diff --git a/views/default/input/password.php b/views/default/input/password.php
index efa0fc74b..45f2b20a6 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -1,22 +1,28 @@
-<?php
-
- /**
- * Elgg password input
- * Displays a password input field
- *
- * @package Elgg
- * @subpackage Core
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008
- * @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
- *
- */
-
-?>
-
-<input type="password" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo $vars['value']; ?>" /> \ No newline at end of file
+<?php
+/**
+ * Elgg password input
+ * Displays a password input field
+ *
+ * @package Elgg
+ * @subpackage Core
+ *
+ * @uses $vars['value'] The current value, if any
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['class'] Additional CSS class
+ */
+
+if (isset($vars['class'])) {
+ $vars['class'] = "elgg-input-password {$vars['class']}";
+} else {
+ $vars['class'] = "elgg-input-password";
+}
+
+$defaults = array(
+ 'disabled' => false,
+ 'value' => '',
+);
+
+$attrs = array_merge($defaults, $vars);
+?>
+
+<input type="password" <?php echo elgg_format_attributes($attrs); ?> />