Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
af428b12
Commit
af428b12
authored
May 13, 2015
by
Vinnie Okada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fill in email on the new password form
parent
c68c2321
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
app/controllers/passwords_controller.rb
app/controllers/passwords_controller.rb
+1
-1
app/helpers/emails_helper.rb
app/helpers/emails_helper.rb
+1
-1
app/views/devise/passwords/new.html.haml
app/views/devise/passwords/new.html.haml
+1
-1
app/views/notify/new_user_email.html.haml
app/views/notify/new_user_email.html.haml
+1
-1
No files found.
app/controllers/passwords_controller.rb
View file @
af428b12
...
...
@@ -52,7 +52,7 @@ class PasswordsController < Devise::PasswordsController
unless
user
.
reset_password_period_valid?
flash
[
:alert
]
=
'Your password reset token has expired.'
redirect_to
(
new_user_password_url
)
redirect_to
(
new_user_password_url
(
user_email:
user
[
'email'
])
)
end
end
end
...
...
app/helpers/emails_helper.rb
View file @
af428b12
...
...
@@ -50,7 +50,7 @@ module EmailsHelper
end
def
reset_token_expire_message
link_tag
=
link_to
(
'request a new one'
,
new_user_password_url
)
link_tag
=
link_to
(
'request a new one'
,
new_user_password_url
(
user_email:
@user
.
email
)
)
msg
=
"This link is valid for
#{
password_reset_token_valid_time
}
. "
msg
<<
"After it expires, you can
#{
link_tag
}
."
end
...
...
app/views/devise/passwords/new.html.haml
View file @
af428b12
...
...
@@ -6,7 +6,7 @@
.devise-errors
=
devise_error_messages!
.clearfix.append-bottom-20
=
f
.
email_field
:email
,
placeholder:
"Email"
,
class:
"form-control"
,
required:
true
=
f
.
email_field
:email
,
placeholder:
"Email"
,
class:
"form-control"
,
required:
true
,
value:
params
[
:user_email
]
.clearfix
=
f
.
submit
"Reset password"
,
class:
"btn-primary btn"
...
...
app/views/notify/new_user_email.html.haml
View file @
af428b12
...
...
@@ -11,6 +11,6 @@
-
if
@user
.
created_by_id
%p
=
link_to
"Click here to set your password"
,
edit_password_url
(
@user
,
:reset_password_token
=>
@token
)
=
link_to
"Click here to set your password"
,
edit_password_url
(
@user
,
reset_password_token:
@token
)
%p
=
reset_token_expire_message
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment