From 7b3674bd7a2b20df3ba37b32b7cc33f574a95dc5 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 18:51:06 +0200 Subject: add html5 'email' type to the user manager forms --- lib/plugins/usermanager/admin.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/usermanager/admin.php b/lib/plugins/usermanager/admin.php index 445836a50..ca4c6a650 100644 --- a/lib/plugins/usermanager/admin.php +++ b/lib/plugins/usermanager/admin.php @@ -311,6 +311,9 @@ class admin_plugin_usermanager extends DokuWiki_Admin_Plugin { if($name == 'userpass'){ $fieldtype = 'password'; $autocomp = 'autocomplete="off"'; + }elseif($name == 'usermail'){ + $fieldtype = 'email'; + $autocomp = ''; }else{ $fieldtype = 'text'; $autocomp = ''; -- cgit v1.2.3 From 2586f61fa6012e65f30cd5e9004ea4d6dea25238 Mon Sep 17 00:00:00 2001 From: Christopher Smith Date: Wed, 31 Jul 2013 19:07:29 +0200 Subject: add html5 attributes to email fields of the config manager --- lib/plugins/config/settings/config.class.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index 8eb99284d..63be3a726 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -717,6 +717,29 @@ if (!class_exists('setting_email')) { $this->_local = $input; return true; } + function html(&$plugin, $echo=false) { + $value = ''; + $disable = ''; + + if ($this->is_protected()) { + $value = $this->_protected; + $disable = 'disabled="disabled"'; + } else { + if ($echo && $this->_error) { + $value = $this->_input; + } else { + $value = is_null($this->_local) ? $this->_default : $this->_local; + } + } + + $multiple = $this->_multiple ? 'multiple="multiple"' : ''; + $key = htmlspecialchars($this->_key); + $value = htmlspecialchars($value); + + $label = ''; + $input = ''; + return array($label,$input); + } } } -- cgit v1.2.3