Browse files

Fix new users login for issue #6

  • Loading branch information...
1 parent 88068af commit ef15d3b6f1cc8677391fb55b0b6780a0334d6d6f @gigasquid committed Jan 6, 2012
Showing with 4 additions and 2 deletions.
  1. +1 −1 resources/public/js/refheap.js
  2. +3 −1 src/refheap/views/login.clj
View
2 resources/public/js/refheap.js
@@ -13,9 +13,9 @@ $(document).ready(function(){
dataType: "json",
success: function(data) {
if (data) {
- console.log("Hi there" + data);
$("#useri").html(data["login-html"]);
$("#language").after(data["private-html"])
+ $("body").html(data["chooselogin-html"])
}
},
});
View
4 src/refheap/views/login.clj
@@ -41,4 +41,6 @@
(if-let [username (login/user-exists email)]
(json {:login-html (html (logged-in username))
:private-html (html (private-checkbox {:private false}))})
- (create-user-page))))
+ (do
+ (session/flash-put! :email email)
+ (json {:chooselogin-html (html (create-user-page email))})))))

0 comments on commit ef15d3b

Please sign in to comment.