Add username display to the reset password form.

This commit is contained in:
Max Goodman
2014-01-08 14:33:10 -08:00
parent ee5659e050
commit c1ef147ad2
2 changed files with 11 additions and 3 deletions

View File

@@ -1294,8 +1294,16 @@ class FormsController(RedditController):
self.logout()
return self.redirect(request.path)
return BoringPage(_("reset password"),
content=ResetPassword(key=key, done=done)).render()
token_user = Account._by_fullname(token.user_id, data=True)
return BoringPage(
_("reset password"),
content=ResetPassword(
key=key,
done=done,
username=token_user.name,
)
).render()
@disable_subreddit_css()
@validate(VUser(),

View File

@@ -31,7 +31,7 @@ ${error_field("EXPIRED", 'p')}
<form id="chpass" method="post" action="/api/resetpassword"
onsubmit="return post_form(this,'resetpassword')">
<h1>choose a new password</h1>
<h1>choose a new password for /u/${thing.username}</h1>
<input type="hidden" name="key" value="${thing.key}"/>
<div class="spacer">