User flow updates
This commit is contained in:
+3
-2
@@ -2,6 +2,7 @@ h2= t('devise.registrations.title')
|
||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
- binding.pry
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls= f.text_field :name
|
||||
.control-group
|
||||
@@ -15,5 +16,5 @@ h2= t('devise.registrations.title')
|
||||
.controls= f.password_field :password_confirmation
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.registrations.button'), class: 'btn btn-primary'
|
||||
= render "devise_links"
|
||||
= f.submit t('devise.registrations.button'), class: 'button2'
|
||||
= render "devise/links"
|
||||
@@ -1,29 +0,0 @@
|
||||
<h2>Sign up</h2>
|
||||
|
||||
<%= form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :email %><br />
|
||||
<%= f.email_field :email, autofocus: true %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password %>
|
||||
<% if @validatable %>
|
||||
<em>(<%= @minimum_password_length %> characters minimum)</em>
|
||||
<% end %><br />
|
||||
<%= f.password_field :password, autocomplete: "off" %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation, autocomplete: "off" %>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<%= f.submit "Sign up" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "devise/shared/links" %>
|
||||
@@ -1,12 +0,0 @@
|
||||
<h2>Resend confirmation instructions</h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.submit "Resend confirmation instructions" %></div>
|
||||
<% end %>
|
||||
|
||||
<%= render "links" %>
|
||||
@@ -0,0 +1,11 @@
|
||||
h2= t('devise.user.confirmations.title')
|
||||
= form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls
|
||||
= f.email_field :email
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.user.confirmations.button'), class: 'button'
|
||||
= render 'users/devise/links'
|
||||
@@ -0,0 +1,23 @@
|
||||
dl.devise-links
|
||||
- devise_mapping = Devise.mappings[resource_name]
|
||||
dt= t 'devise.links.prefix'
|
||||
- if controller_name != 'sessions'
|
||||
dd= link_to t('devise.user.sign_in.link'), new_session_path(resource_name), class: ['devise-link', 'new-session']
|
||||
|
||||
- if devise_mapping.registerable? && controller_name != 'registrations'
|
||||
dd= link_to t('devise.user.registrations.link'), new_registration_path(resource_name), class: ['devise-link', 'new-registration']
|
||||
- if resource_name == :employee and controller_name != 'new_suppliers'
|
||||
dd= link_to t('devise.user.registrations.link'), new_suppliers_path, class: ['devise-link', 'new-registration']
|
||||
|
||||
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
||||
dd= link_to t('devise.user.passwords.link'), new_password_path(resource_name), class: ['devise-link', 'forgot-password']
|
||||
|
||||
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||
dd= link_to t('devise.user.confirmations.did_not_receive_instructions_link'), new_confirmation_path(resource_name), class: ['devise-link', 'did-not-receive-instructions']
|
||||
|
||||
- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks'
|
||||
dd= link_to t('devise.user.unlocks.did_not_receive_instructions_link'), new_unlock_path(resource_name), class: ['devise-link', 'did-not-receive-instructions']
|
||||
|
||||
- if devise_mapping.omniauthable?
|
||||
- resource_class.omniauth_providers.each do |provider|
|
||||
dd= link_to t('devise.user.omniauth_callbacks.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), class: ['devise-link', 'omniauth', provider]
|
||||
@@ -1,6 +1,6 @@
|
||||
p= t('devise.mailer.confirmation_instructions.salutation', email: @resource.email)
|
||||
p== t('mailer.user.confirmation_instructions.salutation', email: @resource.email)
|
||||
|
||||
p=raw t \
|
||||
'devise.mailer.confirmation_instructions.body',
|
||||
p== t \
|
||||
'mailer.user.confirmation_instructions.body',
|
||||
unconfirmed_email: @resource.unconfirmed_email,
|
||||
confirm_url: confirmation_url(@resource, :confirmation_token => @token)
|
||||
confirm_url: confirmation_url(@resource, confirmation_token: @token)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
h2= t('devise.passwords.edit.title')
|
||||
h2= t('devise.user.passwords.edit.title')
|
||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal', method: :put}) do |f|
|
||||
= devise_error_messages!
|
||||
= f.hidden_field :reset_password_token
|
||||
@@ -10,5 +10,5 @@ h2= t('devise.passwords.edit.title')
|
||||
.controls= f.password_field :password_confirmation
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.passwords.edit.button'), class: 'btn btn-primary'
|
||||
= render "links"
|
||||
= f.submit t('devise.user.passwords.edit.button'), class: 'button'
|
||||
= render 'users/devise/links'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
h2= t('devise.passwords.title')
|
||||
h2= t('devise.user.passwords.title')
|
||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
@@ -6,5 +6,5 @@ h2= t('devise.passwords.title')
|
||||
.controls= f.email_field :email
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.passwords.button'), class: 'btn btn-primary'
|
||||
= render "links"
|
||||
= f.submit t('devise.user.passwords.button'), class: 'button'
|
||||
= render 'users/devise/links'
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
h2= t('devise.registrations.title')
|
||||
= form_for(resource, :as => resource_name, :url => registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
h2= t('devise.user.registrations.title')
|
||||
= form_for(resource, as: resource_name, url: registration_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
= f.label :name, class: 'control-label'
|
||||
.controls= f.text_field :name
|
||||
.control-group
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls= f.email_field :email
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls
|
||||
= f.email_field :email
|
||||
- if f.object.errors[:email].present?
|
||||
small.error= f.object.errors[:email].to_sentence
|
||||
.control-group
|
||||
= f.label :password, class: 'control-label'
|
||||
.controls= f.password_field :password
|
||||
= f.label :password, class: 'control-label'
|
||||
.controls= f.password_field :password
|
||||
.control-group
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.controls= f.password_field :password_confirmation
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.controls= f.password_field :password_confirmation
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.registrations.button'), class: 'btn btn-primary'
|
||||
= render "links"
|
||||
= f.submit t('devise.user.registrations.button'), class: 'button'
|
||||
= render 'users/devise/links'
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
h2= t('devise.sessions.title')
|
||||
h2= t('devise.user.sign_in.title')
|
||||
= form_for(resource, :as => resource_name, :url => session_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
.control-group
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls= f.email_field :email
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls
|
||||
= f.email_field :email
|
||||
- if f.object.errors[:email].present?
|
||||
small.error= f.object.errors[:email].to_sentence
|
||||
.control-group
|
||||
= f.label :password, class: 'control-label'
|
||||
.controls= f.password_field :password
|
||||
= f.label :password, class: 'control-label'
|
||||
.controls
|
||||
= f.password_field :password
|
||||
- if f.object.errors[:password].present?
|
||||
small.error= f.object.errors[:password].to_sentence
|
||||
.control-group
|
||||
.controls
|
||||
= f.label :remember_me do
|
||||
= f.check_box :remember_me
|
||||
|
|
||||
= t('devise.sign_in.remember_me')
|
||||
= t('devise.user.sign_in.remember_me')
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.sign_in.button'), class: 'button'
|
||||
= render "links"
|
||||
= f.submit t('devise.user.sign_in.button'), class: 'button'
|
||||
= render 'users/devise/links'
|
||||
|
||||
Reference in New Issue
Block a user