forked from avoinministerio/avoinministerio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request avoinministerio#277 from naleksi/devise-views
Password reseting localization and token lasts 1 day
- Loading branch information
Showing
3 changed files
with
46 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<h2>Vaihda salasana</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 => "Uusi salasana", :required => true %> | ||
<%= f.input :password_confirmation, :label => "Vahvista uusi salasana", :required => true %> | ||
</div> | ||
|
||
<div class="form-actions"> | ||
<%= f.button :submit, "Vaihda salasana" %> | ||
</div> | ||
<% end %> | ||
<%= render "devise/shared/links" %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<%- if controller_name != 'sessions' %> | ||
<%= link_to "Kirjaudu sisään", new_session_path(resource_name) %><br /> | ||
<% end -%> | ||
<%- if devise_mapping.registerable? && controller_name != 'registrations' %> | ||
<%= link_to "Rekisteröidy", new_registration_path(resource_name) %><br /> | ||
<% end -%> | ||
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %> | ||
<%= link_to "Unohditko salasanasi?", 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 #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider) %><br /> | ||
<% end -%> | ||
<% end -%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters