From cd37ae4dd9e6b02a82d8a19ba25f1282b188a3ad Mon Sep 17 00:00:00 2001
From: Alexander Purr <purr@ub.uni-leipzig.de>
Date: Thu, 16 Jan 2020 17:16:54 +0100
Subject: [PATCH] refs #16679 [fid] email inputs as type "email"

---
 module/fid/config/username-change-form.php               | 2 +-
 themes/fid/templates/Auth/AbstractBase/loginfields.phtml | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
 create mode 100644 themes/fid/templates/Auth/AbstractBase/loginfields.phtml

diff --git a/module/fid/config/username-change-form.php b/module/fid/config/username-change-form.php
index 75ac717b6a8..9139e55b080 100644
--- a/module/fid/config/username-change-form.php
+++ b/module/fid/config/username-change-form.php
@@ -46,7 +46,7 @@ return [
         'usernameConfirmation' => [
             'spec' => [
                 'name'       => 'usernameConfirmation',
-                'type'       => Text::class,
+                'type'       => Email::class,
                 'options'    => [
                     'label' => 'label_newusername_confirmation',
                 ],
diff --git a/themes/fid/templates/Auth/AbstractBase/loginfields.phtml b/themes/fid/templates/Auth/AbstractBase/loginfields.phtml
new file mode 100644
index 00000000000..9001e9f97ed
--- /dev/null
+++ b/themes/fid/templates/Auth/AbstractBase/loginfields.phtml
@@ -0,0 +1,8 @@
+<div class="form-group">
+  <label class="control-label" for="login_<?=$this->escapeHtmlAttr($topClass)?>_username"><?=$this->transEsc('Username')?>:</label>
+  <input type="email" name="username" id="login_<?=$this->escapeHtmlAttr($topClass)?>_username" value="<?=$this->escapeHtmlAttr($this->request->get('username'))?>" class="form-control"/>
+</div>
+<div class="form-group">
+  <label class="control-label" for="login_<?=$this->escapeHtmlAttr($topClass)?>_password"><?=$this->transEsc('Password')?>:</label>
+  <input type="password" name="password" id="login_<?=$this->escapeHtmlAttr($topClass)?>_password" class="form-control"/>
+</div>
\ No newline at end of file
-- 
GitLab