Merge pull request #472 from ZogStriP/fixes-random-login

fixes the random login on dev
This commit is contained in:
Robin Ward 2013-03-18 07:30:06 -07:00
commit c1298979bb
2 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,7 @@ Discourse.LoginView = Discourse.ModalBodyView.extend({
$hidden_login_form.find('input[name=username]').val(_this.get('loginName'));
$hidden_login_form.find('input[name=password]').val(_this.get('loginPassword'));
$hidden_login_form.find('input[name=redirect]').val(window.location.href);
$hidden_login_form.find('input[name=authenticity_token]').val($('meta[name=csrf-token]').attr('content'));
$hidden_login_form.submit();
}
}).fail(function(result) {

View File

@ -26,6 +26,7 @@
<input name="username" type="text" id="signin_username">
<input name="password" type="password" id="signin_password">
<input name="redirect" type="hidden">
<input name="authenticity_token" type="hidden" />
<input type="submit" id="signin-button" value="Log In">
</form>
<% end %>