mirror of
https://github.com/beatriceo/polyglot.git
synced 2025-10-22 17:52:10 +00:00
Initial commit with devise template from https://github.com/lewagon/rails-templates
This commit is contained in:
20
app/views/devise/confirmations/new.html.erb
Normal file
20
app/views/devise/confirmations/new.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<%= f.full_error :confirmation_token %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email,
|
||||
required: true,
|
||||
autofocus: true,
|
||||
value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email),
|
||||
input_html: { autocomplete: "email" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Resend confirmation instructions" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
@@ -0,0 +1,5 @@
|
||||
<p>Welcome <%= @email %>!</p>
|
||||
|
||||
<p>You can confirm your account email through the link below:</p>
|
||||
|
||||
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
|
7
app/views/devise/mailer/email_changed.html.erb
Normal file
7
app/views/devise/mailer/email_changed.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<p>Hello <%= @email %>!</p>
|
||||
|
||||
<% if @resource.try(:unconfirmed_email?) %>
|
||||
<p>We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.</p>
|
||||
<% else %>
|
||||
<p>We're contacting you to notify you that your email has been changed to <%= @resource.email %>.</p>
|
||||
<% end %>
|
3
app/views/devise/mailer/password_change.html.erb
Normal file
3
app/views/devise/mailer/password_change.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>We're contacting you to notify you that your password has been changed.</p>
|
@@ -0,0 +1,8 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Someone has requested a link to change your password. You can do this through the link below.</p>
|
||||
|
||||
<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
|
||||
|
||||
<p>If you didn't request this, please ignore this email.</p>
|
||||
<p>Your password won't change until you access the link above and create a new one.</p>
|
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
7
app/views/devise/mailer/unlock_instructions.html.erb
Normal file
@@ -0,0 +1,7 @@
|
||||
<p>Hello <%= @resource.email %>!</p>
|
||||
|
||||
<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
|
||||
|
||||
<p>Click the link below to unlock your account:</p>
|
||||
|
||||
<p><%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %></p>
|
24
app/views/devise/passwords/edit.html.erb
Normal file
24
app/views/devise/passwords/edit.html.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
<h2>Change your password</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<%= f.input :reset_password_token, as: :hidden %>
|
||||
<%= f.full_error :reset_password_token %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :password,
|
||||
label: "New password",
|
||||
required: true,
|
||||
autofocus: true,
|
||||
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
<%= f.input :password_confirmation, label: "Confirm your new password", required: true %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Change my password" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
18
app/views/devise/passwords/new.html.erb
Normal file
18
app/views/devise/passwords/new.html.erb
Normal file
@@ -0,0 +1,18 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email,
|
||||
required: true,
|
||||
autofocus: true,
|
||||
input_html: { autocomplete: "email" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Send me reset password instructions" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
35
app/views/devise/registrations/edit.html.erb
Normal file
35
app/views/devise/registrations/edit.html.erb
Normal file
@@ -0,0 +1,35 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email, required: true, autofocus: true %>
|
||||
|
||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
||||
<p>Currently waiting confirmation for: <%= resource.unconfirmed_email %></p>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :password,
|
||||
hint: "leave it blank if you don't want to change it",
|
||||
required: false
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
<%= f.input :password_confirmation,
|
||||
required: false,
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
<%= f.input :current_password,
|
||||
hint: "we need your current password to confirm your changes",
|
||||
required: true,
|
||||
input_html: { autocomplete: "current-password" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Update" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
25
app/views/devise/registrations/new.html.erb
Normal file
25
app/views/devise/registrations/new.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email,
|
||||
required: true,
|
||||
autofocus: true ,
|
||||
input_html: { autocomplete: "email" }%>
|
||||
<%= f.input :password,
|
||||
required: true,
|
||||
hint: ("#{@minimum_password_length} characters minimum" if @minimum_password_length),
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
<%= f.input :password_confirmation,
|
||||
required: true,
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Sign up" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
20
app/views/devise/sessions/new.html.erb
Normal file
20
app/views/devise/sessions/new.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<h2>Log in</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email,
|
||||
required: false,
|
||||
autofocus: true,
|
||||
input_html: { autocomplete: "email" } %>
|
||||
<%= f.input :password,
|
||||
required: false,
|
||||
input_html: { autocomplete: "current-password" } %>
|
||||
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Log in" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
25
app/views/devise/shared/_links.html.erb
Normal file
25
app/views/devise/shared/_links.html.erb
Normal file
@@ -0,0 +1,25 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to "Sign up", new_registration_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to "Forgot your password?", new_password_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name) %><br />
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to "Sign in with #{OmniAuth::Utils.camelize(provider)}", omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
19
app/views/devise/unlocks/new.html.erb
Normal file
19
app/views/devise/unlocks/new.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= f.error_notification %>
|
||||
<%= f.full_error :unlock_token %>
|
||||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :email,
|
||||
required: true,
|
||||
autofocus: true,
|
||||
input_html: { autocomplete: "email" } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, "Resend unlock instructions" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
Reference in New Issue
Block a user