Skip to content

Commit

Permalink
Add the forgotten password to the UI - though response format not qui…
Browse files Browse the repository at this point in the history
…te where it's at…
  • Loading branch information
remy committed Jul 22, 2012
1 parent a106752 commit e056f5a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
11 changes: 11 additions & 0 deletions public/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2408,4 +2408,15 @@ pre .highlight:last-of-type {

.ie span.icon {
zoom: 1;

#login .forgot {
display: none;
}

#login.forgot .forgot {
display: block;
}

#login.forgot .login {
display: none;
}
5 changes: 5 additions & 0 deletions public/js/chrome/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,13 @@ $('#createnew').click(function () {

$('form.login').closest('.menu').bind('close', function () {
$(this).find('.loginFeedback').empty().hide();
$('#login').removeClass('forgot');
});

$('#lostpass').click(function (e) {
$('#login').addClass('forgot').find('input[name=email]').focus();
return false;
});

jsbin.settings.includejs = jsbin.settings.includejs === undefined ? true : jsbin.settings.includejs;

Expand Down
11 changes: 11 additions & 0 deletions views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@
<a href="#login" class="button button-open" id="loginbtn">Log in</a>
<div class="dropdown dd-right" id="login">
<div class="dropdowncontent">
<form class="forgot" action="/forgot" method="post">
<div>
<label>Email<br>
<input name="email" required type="email"></label>
</div>
<div>
<input type=submit value="Request password reset">
<input type="hidden" name="_csrf" value="{{token}}">
<input type="hidden" name="_redirect" value="home">
</div>
</form>
<form class="login">
<p class="loginFeedback"></p>
<div>
Expand Down

0 comments on commit e056f5a

Please sign in to comment.