Add user model through devise. Add some basic layout. Start testing in travis.
This commit is contained in:
1 parent
1bc17c462a
commit
b7b1e2b3fd
45 files changed
+599
-155
No files matched your search
@@ -1,16 +1,16 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
<h1><%= t('.resend_confirmation_instructions') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email", value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email) %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', value: (resource.pending_reconfirmation? ? resource.unconfirmed_email : resource.email), class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Resend confirmation instructions" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.resend_confirmation_instructions'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
@@ -1,25 +1,26 @@
|
||||
<h2>Change your password</h2>
|
||||
<h1><%= t('.change_your_password') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
<%= f.hidden_field :reset_password_token %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password, "New password" %><br />
|
||||
<div class="form-group">
|
||||
<%= f.label :password, t('.new_password') %>
|
||||
<%= f.password_field :password, autofocus: true, class: 'form-control' %>
|
||||
|
||||
<% if @minimum_password_length %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em><br />
|
||||
<small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small>
|
||||
<% end %>
|
||||
<%= f.password_field :password, autofocus: true, autocomplete: "new-password" %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation, "Confirm new password" %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation, t('.confirm_new_password') %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: 'off', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Change my password" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.change_my_password'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
@@ -1,16 +1,16 @@
|
||||
<h2>Forgot your password?</h2>
|
||||
<h1><%= t('.forgot_your_password') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Send me reset password instructions" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.send_me_reset_password_instructions'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
@@ -1,43 +1,37 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
<h1><%= t('.title', resource: resource_name.to_s.humanize) %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
|
||||
<div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
|
||||
<% end %>
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, autocomplete: 'new-password', class: 'form-control' %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, autocomplete: "new-password" %>
|
||||
<% if @minimum_password_length %>
|
||||
<br />
|
||||
<em><%= @minimum_password_length %> characters minimum</em>
|
||||
<% end %>
|
||||
<small class="form-text text-muted"><%= t('.leave_blank_if_you_don_t_want_to_change_it') %></small>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: 'new-password', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password, autocomplete: "current-password" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :current_password %>
|
||||
<%= f.password_field :current_password, autocomplete: 'current-password', class: 'form-control' %>
|
||||
|
||||
<small class="form-text text-muted"><%= t('.we_need_your_current_password_to_confirm_your_changes') %></small>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Update" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.update'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
<p><%= t('.unhappy') %>? <%= link_to t('.cancel_my_account'), registration_path(resource_name), data: { confirm: t('.are_you_sure') }, method: :delete %>.</p>
|
||||
|
||||
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), data: { confirm: "Are you sure?" }, method: :delete %></p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
<%= link_to t('.back'), :back %>
|
||||
@@ -1,29 +1,30 @@
|
||||
<h2>Sign up</h2>
|
||||
<h1><%= t('.sign_up') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %>
|
||||
|
||||
<% if @minimum_password_length %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
||||
<% end %><br />
|
||||
<%= f.password_field :password, autocomplete: "new-password" %>
|
||||
<small class="form-text text-muted"><%= t('devise.shared.minimum_password_length', count: @minimum_password_length) %></small>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "new-password" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :password_confirmation %>
|
||||
<%= f.password_field :password_confirmation, autocomplete: 'current-password', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Sign up" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.sign_up'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
@@ -1,26 +1,28 @@
|
||||
<h2>Log in</h2>
|
||||
<h1><%= t('.sign_in') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password %><br />
|
||||
<%= f.password_field :password, autocomplete: "current-password" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :password %>
|
||||
<%= f.password_field :password, autocomplete: 'current-password', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<% if devise_mapping.rememberable? %>
|
||||
<div class="field">
|
||||
<%= f.check_box :remember_me %>
|
||||
<%= f.label :remember_me %>
|
||||
<div class="form-group form-check">
|
||||
<%= f.check_box :remember_me, class: 'form-check-input' %>
|
||||
<%= f.label :remember_me, class: 'form-check-label' do %>
|
||||
<%= resource.class.human_attribute_name('remember_me') %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Log in" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.sign_in'), class: 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
@@ -1,25 +1,27 @@
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to "Log in", new_session_path(resource_name) %><br />
|
||||
<% end %>
|
||||
<div class="form-group">
|
||||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t(".sign_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.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t(".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.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
|
||||
<%= link_to t(".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.confirmable? && controller_name != 'confirmations' %>
|
||||
<%= link_to t('.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.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
||||
<%= link_to t('.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 %>
|
||||
<%- if devise_mapping.omniauthable? %>
|
||||
<%- resource_class.omniauth_providers.each do |provider| %>
|
||||
<%= link_to t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
@@ -1,16 +1,16 @@
|
||||
<h2>Resend unlock instructions</h2>
|
||||
<h1><%= t('.resend_unlock_instructions') %></h1>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= render "devise/shared/error_messages", resource: resource %>
|
||||
<%= bootstrap_devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
|
||||
<div class="form-group">
|
||||
<%= f.label :email %>
|
||||
<%= f.email_field :email, autofocus: true, autocomplete: 'email', class: 'form-control' %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Resend unlock instructions" %>
|
||||
<div class="form-group">
|
||||
<%= f.submit t('.resend_unlock_instructions'), class: 'btn btn-primary'%>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
<%= render 'devise/shared/links' %>
|
||||
Reference in new issue
Block a user