Fix code style
This commit is contained in:
parent
79d95f1351
commit
c9f6b0328e
6 changed files with 59 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
|||
<h2><%= t(".change_your_password") %></h2>
|
||||
<h2><%= translate '.change_your_password' %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= 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 %>
|
||||
|
@ -8,17 +8,18 @@
|
|||
|
||||
<div class="form-inputs">
|
||||
<%= f.input :password,
|
||||
label: t(".new_password"),
|
||||
label: translate('.new_password'),
|
||||
required: true,
|
||||
autofocus: true,
|
||||
hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
<%= f.input :password_confirmation, label: t(".confirm_new_password"), required: true %>
|
||||
hint: (translate('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
|
||||
input_html: { autocomplete: 'new-password' } %>
|
||||
|
||||
<%= f.input :password_confirmation, label: translate('.confirm_new_password'), required: true %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, t(".change_my_password") %>
|
||||
<%= f.button :submit, translate('.change_my_password') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
<%= render 'users/shared/links' %>
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
<h2><%= t(".forgot_your_password") %></h2>
|
||||
<h2><%= translate '.forgot_your_password' %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :post }) do |f| %>
|
||||
<%= 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" } %>
|
||||
input_html: { autocomplete: 'email' } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, t(".send_me_reset_password_instructions") %>
|
||||
<%= f.button :submit, translate('.send_me_reset_password_instructions') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
<%= render 'users/shared/links' %>
|
||||
|
|
|
@ -1,35 +1,40 @@
|
|||
<h2><%= t(".title", resource: resource.model_name.human) %></h2>
|
||||
<h2><%= translate '.title', resource: resource.model_name.human %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
|
||||
<%= 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><%= t(".currently_waiting_confirmation_for_email", email: resource.unconfirmed_email) %></p>
|
||||
<p><%= translate '.currently_waiting_confirmation_for_email', email: resource.unconfirmed_email %></p>
|
||||
<% end %>
|
||||
|
||||
<%= f.input :password,
|
||||
hint: t(".leave_blank_if_you_don_t_want_to_change_it"),
|
||||
hint: translate('.leave_blank_if_you_don_t_want_to_change_it'),
|
||||
required: false
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
input_html: { autocomplete: 'new-password' } %>
|
||||
|
||||
<%= f.input :password_confirmation,
|
||||
required: false,
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
input_html: { autocomplete: 'new-password' } %>
|
||||
|
||||
<%= f.input :current_password,
|
||||
hint: t(".we_need_your_current_password_to_confirm_your_changes"),
|
||||
hint: translate('.we_need_your_current_password_to_confirm_your_changes'),
|
||||
required: true,
|
||||
input_html: { autocomplete: "current-password" } %>
|
||||
input_html: { autocomplete: 'current-password' } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, t(".update") %>
|
||||
<%= f.button :submit, translate('.update') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<h3><%= t(".cancel_my_account") %></h3>
|
||||
<h3><%= translate '.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>
|
||||
<%= translate '.unhappy' %>
|
||||
<%= link_to translate('.cancel_my_account'), registration_path(resource_name), data: { confirm: translate('.are_you_sure') }, method: :delete %>
|
||||
</p>
|
||||
|
||||
<%= link_to t("devise.shared.links.back"), :back %>
|
||||
<%= link_to translate('devise.shared.links.back'), :back %>
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
<h2><%= t(".sign_up") %></h2>
|
||||
<h2><%= translate '.sign_up' %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| %>
|
||||
<%= 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" }%>
|
||||
input_html: { autocomplete: 'email' }%>
|
||||
<%= f.input :password,
|
||||
required: true,
|
||||
hint: (t('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
hint: (translate('devise.shared.minimum_password_length', count: @minimum_password_length) if @minimum_password_length),
|
||||
input_html: { autocomplete: 'new-password' } %>
|
||||
<%= f.input :password_confirmation,
|
||||
required: true,
|
||||
input_html: { autocomplete: "new-password" } %>
|
||||
input_html: { autocomplete: 'new-password' } %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, t(".sign_up") %>
|
||||
<%= f.button :submit, translate('.sign_up') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
<%= render 'users/shared/links' %>
|
||||
|
|
|
@ -1,20 +1,22 @@
|
|||
<h2><%= t(".sign_in") %></h2>
|
||||
<h2><%= translate '.sign_in' %></h2>
|
||||
|
||||
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
||||
<%= 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" } %>
|
||||
input_html: { autocomplete: 'email' } %>
|
||||
|
||||
<%= f.input :password,
|
||||
required: false,
|
||||
input_html: { autocomplete: "current-password" } %>
|
||||
input_html: { autocomplete: 'current-password' } %>
|
||||
|
||||
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<%= f.button :submit, t(".sign_in") %>
|
||||
<%= f.button :submit, translate('.sign_in') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= render "users/shared/links" %>
|
||||
<%= render 'users/shared/links' %>
|
||||
|
|
|
@ -1,25 +1,31 @@
|
|||
<%- if controller_name != 'sessions' %>
|
||||
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br />
|
||||
<%= link_to translate('.sign_in'), new_session_path(resource_name) %>
|
||||
<br/>
|
||||
<% end -%>
|
||||
|
||||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
||||
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br />
|
||||
<%= link_to translate('.sign_up'), new_registration_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 />
|
||||
<%= link_to translate('.forgot_your_password'), new_password_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 />
|
||||
<%= link_to translate('.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 t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br />
|
||||
<%= link_to translate('.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 t('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %><br />
|
||||
<%= link_to translate('.sign_in_with_provider', provider: OmniAuth::Utils.camelize(provider)), omniauth_authorize_path(resource_name, provider) %>
|
||||
<br/>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
|
|
Reference in a new issue