From 19ec20ab89bf938fe2dd1a99b62debc76e199425 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 5 Dec 2014 19:15:41 +0100 Subject: Add option to hide or show password fields --- inc/property.inc.php | 10 ++++++++++ inc/render.inc.php | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'inc') diff --git a/inc/property.inc.php b/inc/property.inc.php index 6a639dd2..c16c8ad7 100644 --- a/inc/property.inc.php +++ b/inc/property.inc.php @@ -171,5 +171,15 @@ class Property { return self::get('needs-setup'); } + + public static function setPasswordFieldType($value) + { + return self::set('password-type', $value); + } + + public static function getPasswordFieldType() + { + return self::get('password-type', 'password'); + } } diff --git a/inc/render.inc.php b/inc/render.inc.php index fc64203e..5827dcf9 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -179,8 +179,10 @@ class Render // Always add token to parameter list if (is_array($params) || $params === false || is_null($params)) $params['token'] = Session::get('token'); - // Likewise, add currently selected language ( its two letter code) to params + // Likewise, add currently selected language (its two letter code) to params $params['current_lang'] = LANG; + // Add desired password field type + $params['password_type'] = Property::getPasswordFieldType(); // Return rendered html return self::$mustache->render($html, array_merge($dictionary,$params)); } -- cgit v1.2.3-55-g7522