Update design of forgot_password and change_password forms
Fix redirect to stream, make labels lower-case Fix cuke
This commit is contained in:
parent
4a3869cda8
commit
2a145e67ab
13 changed files with 69 additions and 38 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
* Update image branding to the new decided standard [#4702](https://github.com/diaspora/diaspora/pull/4702)
|
* Update image branding to the new decided standard [#4702](https://github.com/diaspora/diaspora/pull/4702)
|
||||||
* Consistent naming of conversations and messages [#4756](https://github.com/diaspora/diaspora/pull/4756)
|
* Consistent naming of conversations and messages [#4756](https://github.com/diaspora/diaspora/pull/4756)
|
||||||
* Improve stream generation time [#4769](https://github.com/diaspora/diaspora/pull/4769)
|
* Improve stream generation time [#4769](https://github.com/diaspora/diaspora/pull/4769)
|
||||||
|
* Update forgot_password and reset_password pages [#4707](https://github.com/diaspora/diaspora/pull/4707)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)
|
* Improve time agos by updating the plugin [#4280](https://github.com/diaspora/diaspora/issues/4280)
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ a { color : $link-blue }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#login {
|
#login,
|
||||||
|
#forgot_password,
|
||||||
|
#reset_password {
|
||||||
background-image : image_url("texture/light-bg.png");
|
background-image : image_url("texture/light-bg.png");
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
#login {
|
#login,
|
||||||
|
#forgot_password,
|
||||||
|
#reset_password {
|
||||||
position : absolute;
|
position : absolute;
|
||||||
top : 0;
|
top : 0;
|
||||||
left : 0;
|
left : 0;
|
||||||
|
|
@ -8,6 +10,10 @@
|
||||||
//color : #fff;
|
//color : #fff;
|
||||||
text-align : center;
|
text-align : center;
|
||||||
|
|
||||||
|
label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
input[type=text],
|
input[type=text],
|
||||||
input[type=password] {
|
input[type=password] {
|
||||||
width : 120px;
|
width : 120px;
|
||||||
|
|
|
||||||
4
app/controllers/passwords_controller.rb
Normal file
4
app/controllers/passwords_controller.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
class PasswordsController < Devise::PasswordsController
|
||||||
|
layout "application", :only => [:new]
|
||||||
|
before_filter -> { @css_framework = :bootstrap }, only: [:new, :create, :edit]
|
||||||
|
end
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
.span-12.prepend-6.last
|
|
||||||
.floating
|
|
||||||
%h2
|
|
||||||
= t('.change_password')
|
|
||||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f|
|
|
||||||
= devise_error_messages!
|
|
||||||
= f.hidden_field :reset_password_token
|
|
||||||
%p
|
|
||||||
= f.label :password, t('password')
|
|
||||||
%br/
|
|
||||||
= f.password_field :password
|
|
||||||
%p
|
|
||||||
= f.label :password_confirmation, t('password_confirmation')
|
|
||||||
%br/
|
|
||||||
= f.password_field :password_confirmation
|
|
||||||
%p
|
|
||||||
= f.submit t('.change_password')
|
|
||||||
= render :partial => "devise/shared/links"
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
.span-12.prepend-6.last
|
|
||||||
.floating
|
|
||||||
%h2
|
|
||||||
= t('.forgot_password')
|
|
||||||
- unless devise_error_messages!.empty?
|
|
||||||
%i= t('.no_account')
|
|
||||||
|
|
||||||
= form_for(resource, :as => resource_name, :url => password_path(resource_name)) do |f|
|
|
||||||
%p
|
|
||||||
= f.label :email, t('email')
|
|
||||||
= f.text_field :email
|
|
||||||
%p
|
|
||||||
= f.submit t('.send_password_instructions')
|
|
||||||
= render :partial => "devise/shared/links"
|
|
||||||
27
app/views/passwords/edit.haml
Normal file
27
app/views/passwords/edit.haml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
- content_for :page_title do
|
||||||
|
= "#{AppConfig.settings.pod_name} / #{t('devise.passwords.edit.change_password')}"
|
||||||
|
|
||||||
|
#reset_password
|
||||||
|
%h1{id: "huge-text"}= AppConfig.settings.pod_name
|
||||||
|
|
||||||
|
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:class => "form-horizontal block-form", :method => :put }, :autocomplete => 'off') do |f|
|
||||||
|
%fieldset
|
||||||
|
= f.hidden_field :reset_password_token
|
||||||
|
.control-group
|
||||||
|
%label{class: "control-label", for: "user_password", style: "width: 45%; text-align: right; padding: 10px 0; overflow: hidden"}
|
||||||
|
= t('devise.passwords.edit.new_password')
|
||||||
|
.controls
|
||||||
|
= f.password_field :password, :required => true, :placeholder => "••••••••", :autocapitalize => "off", :autocorrect => "off", :autofocus => true, :style => "width: 55%;"
|
||||||
|
.control-group
|
||||||
|
%label{class: "control-label", for: "user_password_confirmation", style: "width: 45%; text-align: right; padding: 10px 0; overflow: hidden"}
|
||||||
|
= t('devise.passwords.edit.confirm_password')
|
||||||
|
.controls
|
||||||
|
= f.password_field :password_confirmation, :required => true, :placeholder => "••••••••", :autocapitalize => "off", :autocorrect => "off", :style => "width: 55%;"
|
||||||
|
= hidden_field(:user, :remember_me, :value => 1)
|
||||||
|
= f.submit t('devise.passwords.edit.change_password'), :class => "new-btn"
|
||||||
|
|
||||||
|
%br/
|
||||||
|
%br/
|
||||||
|
%br/
|
||||||
|
= link_to t('devise.shared.links.sign_in'), new_session_path(resource_name)
|
||||||
|
|
||||||
20
app/views/passwords/new.haml
Normal file
20
app/views/passwords/new.haml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
- content_for :page_title do
|
||||||
|
= "#{AppConfig.settings.pod_name} / #{t('devise.passwords.new.forgot_password')}"
|
||||||
|
|
||||||
|
#forgot_password
|
||||||
|
%h1{id: "huge-text"}= AppConfig.settings.pod_name
|
||||||
|
|
||||||
|
= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => {:class => "form-horizontal block-form"}, :autocomplete => 'off') do |f|
|
||||||
|
%fieldset
|
||||||
|
.control-group
|
||||||
|
%label{class: "control-label", for: "user_email", style: "width: 40%; text-align: center; padding: 10px 0; overflow: hidden"}
|
||||||
|
= t('devise.passwords.new.email')
|
||||||
|
.controls
|
||||||
|
= f.text_field :email, :required => true, :autocapitalize => "off", :placeholder => "••••••••", :autocorrect => "off", :autofocus => true, :style => "width: 60%;"
|
||||||
|
= f.submit t('devise.passwords.new.send_password_instructions'), :class => "new-btn"
|
||||||
|
|
||||||
|
%br/
|
||||||
|
%br/
|
||||||
|
%br/
|
||||||
|
= link_to t('devise.shared.links.sign_in'), new_session_path(resource_name)
|
||||||
|
|
||||||
|
|
@ -30,9 +30,13 @@ en:
|
||||||
updated: 'Your password was changed successfully. You are now signed in.'
|
updated: 'Your password was changed successfully. You are now signed in.'
|
||||||
edit:
|
edit:
|
||||||
change_password: "Change my password"
|
change_password: "Change my password"
|
||||||
|
new_password: "New password"
|
||||||
|
confirm_password: "Confirm password"
|
||||||
new:
|
new:
|
||||||
forgot_password: "Forgot your password?"
|
forgot_password: "Forgot your password?"
|
||||||
no_account: 'No account with this email exists'
|
no_account: 'No account with this email exists'
|
||||||
|
reset_password: "Reset password"
|
||||||
|
email: "Email address"
|
||||||
send_password_instructions: "Send me reset password instructions"
|
send_password_instructions: "Send me reset password instructions"
|
||||||
confirmations:
|
confirmations:
|
||||||
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
|
send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Diaspora::Application.routes.draw do
|
||||||
match 'users/edit' => redirect('/user/edit')
|
match 'users/edit' => redirect('/user/edit')
|
||||||
|
|
||||||
devise_for :users, :controllers => {:registrations => "registrations",
|
devise_for :users, :controllers => {:registrations => "registrations",
|
||||||
:password => "devise/passwords",
|
:passwords => "passwords",
|
||||||
:sessions => "sessions"}
|
:sessions => "sessions"}
|
||||||
|
|
||||||
#legacy routes to support old invite routes
|
#legacy routes to support old invite routes
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ Feature: Change password
|
||||||
Scenario: Reset my password
|
Scenario: Reset my password
|
||||||
Given a user with email "forgetful@users.net"
|
Given a user with email "forgetful@users.net"
|
||||||
Given I am on forgot password page
|
Given I am on forgot password page
|
||||||
When I fill out forgot password form with "Forgetful@users.net"
|
When I fill out forgot password form with "forgetful@users.net"
|
||||||
And I submit forgot password form
|
And I submit forgot password form
|
||||||
Then I should see "You will receive an email with instructions"
|
Then I should see "You will receive an email with instructions"
|
||||||
When I follow the "Change my password" link from the last sent email
|
When I follow the "Change my password" link from the last sent email
|
||||||
Then I should see "Change my password"
|
Then I should see "NEW PASSWORD"
|
||||||
When I fill out reset password form with "supersecret" and "supersecret"
|
When I fill out reset password form with "supersecret" and "supersecret"
|
||||||
And I submit reset password form
|
And I submit reset password form
|
||||||
Then I should be on the stream page
|
Then I should be on the stream page
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue