summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authormo <mo.khan@gmail.com>2017-09-09 11:53:56 -0600
committermo <mo.khan@gmail.com>2017-09-09 11:53:56 -0600
commit322b4859cd004f3a8556408eab6627d925324c95 (patch)
tree2204e07fa52f0ff79cfa64980f6cdc9ec1f7e85a /app/views
parent1b0a8ea5193578d6bf67722f237ab0a877353e28 (diff)
add client side validation to password reset form.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/passwords/new.html.erb16
1 files changed, 7 insertions, 9 deletions
diff --git a/app/views/passwords/new.html.erb b/app/views/passwords/new.html.erb
index 72be491d..af01e910 100644
--- a/app/views/passwords/new.html.erb
+++ b/app/views/passwords/new.html.erb
@@ -1,14 +1,12 @@
<div class="row">
- <div class="col">
+ <div class="col" data-autoview="password-reset-form">
<h1>Forgot your password?</h1>
- <%= form_for(@user, url: passwords_path) do |f| %>
- <fieldset>
- <legend>Type your email address below to reset your password.</legend>
- <div class="form-group">
- <%= f.email_field :email, placeholder: "Email", class: "form-control", required: :required %>
- </div>
- <button type="submit" class="btn btn-primary">Send me reset password instructions</button>
- </fieldset>
+ <%= form_for(@user, url: passwords_path, html: { class: "form-horizontal needs-validation", novalidate: :novalidate }) do |f| %>
+ <div class="form-group">
+ <%= f.email_field :email, placeholder: "Email", class: "form-control", required: :required %>
+ <div class="invalid-feedback"></div>
+ </div>
+ <%= f.submit "Send me reset password instructions", class: "btn btn-primary" %>
<% end %>
</div>
</div>