Add spanish locales and gravatar options
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
h2= t('devise.employee.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.employee.confirmations.button'), class: 'button'
|
||||
= render 'employees/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.employee.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.employee.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.employee.registrations.link'), new_suppliers_path, class: ['devise-link', 'new-registration']
|
||||
|
||||
- if devise_mapping.recoverable? && controller_name != 'passwords'
|
||||
dd= link_to t('devise.employee.passwords.link'), new_password_path(resource_name), class: ['devise-link', 'forgot-password']
|
||||
|
||||
- if devise_mapping.confirmable? && controller_name != 'confirmations'
|
||||
dd= link_to t('devise.employee.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.employee.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.employee.omniauth_callbacks.sign_in_with', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider), class: ['devise-link', 'omniauth', provider]
|
||||
@@ -1,12 +1,14 @@
|
||||
h2= t('devise.passwords.edit.title')
|
||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {method: :put}) do |f|
|
||||
h2= t('devise.employee.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
|
||||
= f.row :password
|
||||
.form-label= f.label :password
|
||||
.form-field= f.password_field :password
|
||||
= f.row :password_confirmation
|
||||
.form-label= f.label :password_confirmation
|
||||
.form-field= f.password_field :password_confirmation
|
||||
.form-row= f.submit t('devise.passwords.edit.button'), class: 'button'
|
||||
= render "devise/links"
|
||||
.control-group
|
||||
= 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
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.employee.passwords.edit.button'), class: 'button'
|
||||
= render 'employees/devise/links'
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
h2= t('devise.passwords.title')
|
||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name)) do |f|
|
||||
h2= t('devise.employee.passwords.title')
|
||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), html: {class: 'form-horizontal'}) do |f|
|
||||
= devise_error_messages!
|
||||
= f.row :email do
|
||||
.form-label= f.label :email, class: 'control-label'
|
||||
.form-field= f.email_field :email, autofocus: true
|
||||
.form-row.form-actions= f.submit t('devise.passwords.button'), class: 'button'
|
||||
= render "devise/links"
|
||||
.control-group
|
||||
= f.label :email, class: 'control-label'
|
||||
.controls= f.email_field :email
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.employee.passwords.button'), class: 'button'
|
||||
= render 'employees/devise/links'
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<h2>Edit <%= resource_name.to_s.humanize %></h2>
|
||||
|
||||
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %>
|
||||
<%= devise_error_messages! %>
|
||||
|
||||
<div><%= f.label :email %><br />
|
||||
<%= f.email_field :email %></div>
|
||||
|
||||
<div><%= f.label :password %> <i>(leave blank if you don't want to change it)</i><br />
|
||||
<%= f.password_field :password, :autocomplete => "off" %></div>
|
||||
|
||||
<div><%= f.label :password_confirmation %><br />
|
||||
<%= f.password_field :password_confirmation %></div>
|
||||
|
||||
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
|
||||
<%= f.password_field :current_password %></div>
|
||||
|
||||
<div><%= f.submit "Update" %></div>
|
||||
<% end %>
|
||||
|
||||
<h3>Cancel my account</h3>
|
||||
|
||||
<p>Unhappy? <%= link_to "Cancel my account", registration_path(resource_name), :confirm => "Are you sure?", :method => :delete %>.</p>
|
||||
|
||||
<%= link_to "Back", :back %>
|
||||
@@ -0,0 +1,22 @@
|
||||
h2= t('devise.employee.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
|
||||
- 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
|
||||
.control-group
|
||||
= f.label :password_confirmation, class: 'control-label'
|
||||
.controls= f.password_field :password_confirmation
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.employee.registrations.button'), class: 'button'
|
||||
= render 'employees/devise/links'
|
||||
@@ -0,0 +1,25 @@
|
||||
h2= t('devise.employee.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
|
||||
- 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
|
||||
- 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.employee.sign_in.remember_me')
|
||||
.control-group
|
||||
.controls
|
||||
= f.submit t('devise.employee.sign_in.button'), class: 'button'
|
||||
= render 'employees/devise/links'
|
||||
@@ -38,4 +38,4 @@
|
||||
|
||||
.row
|
||||
.small-12.columns== @page.footer
|
||||
= render "devise/links", resource_name: :employee
|
||||
/= render "devise/links", resource_name: :employee
|
||||
|
||||
Reference in New Issue
Block a user