Installed authentication-zero
This commit is contained in:
43
app/views/identity/emails/edit.html.erb
Normal file
43
app/views/identity/emails/edit.html.erb
Normal file
@@ -0,0 +1,43 @@
|
||||
<p style="color: red"><%= alert %></p>
|
||||
|
||||
<% if Current.user.verified? %>
|
||||
<h1>Change your email</h1>
|
||||
<% else %>
|
||||
<h1>Verify your email</h1>
|
||||
<p>We sent a verification email to the address below. Check that email and follow those instructions to confirm it's your email address.</p>
|
||||
<p><%= button_to "Re-send verification email", identity_email_verification_path %></p>
|
||||
<% end %>
|
||||
|
||||
<%= form_with(url: identity_email_path, method: :patch) do |form| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div style="color: red">
|
||||
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @user.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div>
|
||||
<%= form.label :email, "New email", style: "display: block" %>
|
||||
<%= form.email_field :email, required: true, autofocus: true %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :password_challenge, style: "display: block" %>
|
||||
<%= form.password_field :password_challenge, required: true, autocomplete: "current-password" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit "Save changes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
<%= link_to "Back", root_path %>
|
||||
</div>
|
||||
32
app/views/identity/password_resets/edit.html.erb
Normal file
32
app/views/identity/password_resets/edit.html.erb
Normal file
@@ -0,0 +1,32 @@
|
||||
<h1>Reset your password</h1>
|
||||
|
||||
<%= form_with(url: identity_password_reset_path, method: :patch) do |form| %>
|
||||
<% if @user.errors.any? %>
|
||||
<div style="color: red">
|
||||
<h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>
|
||||
|
||||
<ul>
|
||||
<% @user.errors.each do |error| %>
|
||||
<li><%= error.full_message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= form.hidden_field :sid, value: params[:sid] %>
|
||||
|
||||
<div>
|
||||
<%= form.label :password, "New password", style: "display: block" %>
|
||||
<%= form.password_field :password, required: true, autofocus: true, autocomplete: "new-password" %>
|
||||
<div>12 characters minimum.</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.label :password_confirmation, "Confirm new password", style: "display: block" %>
|
||||
<%= form.password_field :password_confirmation, required: true, autocomplete: "new-password" %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit "Save changes" %>
|
||||
</div>
|
||||
<% end %>
|
||||
14
app/views/identity/password_resets/new.html.erb
Normal file
14
app/views/identity/password_resets/new.html.erb
Normal file
@@ -0,0 +1,14 @@
|
||||
<p style="color: red"><%= alert %></p>
|
||||
|
||||
<h1>Forgot your password?</h1>
|
||||
|
||||
<%= form_with(url: identity_password_reset_path) do |form| %>
|
||||
<div>
|
||||
<%= form.label :email, style: "display: block" %>
|
||||
<%= form.email_field :email, required: true, autofocus: true %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= form.submit "Send password reset email" %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user