Add autofocus and required attributes (#2703)

* Set required attribute to input fields

It is needed to type in a username and password. This attribute force it and reduce useless requests to the server and shows the user the problem directly.

* Update signin.html.erb

* add autofocus and required attributes

* add autofocus and required attributes

Co-authored-by: Ahmad Farhat <ahmad.af.farhat@gmail.com>
This commit is contained in:
Dennis1993
2021-06-08 01:13:00 +02:00
committed by GitHub
parent b61df09b94
commit 184ffdb288
3 changed files with 8 additions and 8 deletions

View File

@ -12,7 +12,7 @@
<span class="input-icon-addon">
<i class="fas fa-user"></i>
</span>
<%= f.text_field :username, class: "form-control", placeholder: t("administrator.users.table.username"), value: "", autocomplete: "username", autocapitalize: "none", spellcheck: "false", autofocus: "" %>
<%= f.text_field :username, class: "form-control", placeholder: t("administrator.users.table.username"), value: "", autocomplete: "username", autocapitalize: "none", spellcheck: "false", autofocus: "", required: "" %>
</div>
</div>
<div class="form-group">
@ -20,7 +20,7 @@
<span class="input-icon-addon">
<i class="fas fa-key"></i>
</span>
<%= f.password_field :password, class: "form-control", placeholder: t("password"), value: "" %>
<%= f.password_field :password, class: "form-control", placeholder: t("password"), value: "", required: "" %>
</div>
</div>
<div>