Permalink
Browse files

Handle bad credentials in a smarter way.

  • Loading branch information...
1 parent b8ba583 commit aae5b258ccb57a2af89aeb377963476610b64e47 Michael Aufreiter committed May 8, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −1 _includes/templates/posts._
  2. +4 −0 _includes/templates/start._
  3. +2 −1 _includes/views/start.js
  4. +1 −1 index.html
@@ -35,6 +35,6 @@
<% }); %>
</div>
<% } else { %>
- <h2>No Posts yet</h2>
+ <h2>No posts in this category.</h2>
<% } %>
</div>
@@ -10,10 +10,14 @@
<li>
<label>Password</label>
<input type='password' id='github_password' class='required' name='password' placeholder='password' size='24' />
+ <li class="bad-credentials">
+ Bad credentials
+ </li>
<div class='button-padding state'>
<input type='submit' value='Log in' />
</div>
</li>
+
</ul></form>
</div>
<% } else { %>
View
@@ -35,11 +35,12 @@ views.Start = Backbone.View.extend({
_login: function() {
var self = this;
+
var user = self.$('#github_user').val();
var password = self.$('#github_password').val();
login({username: user, password: password}, function(err) {
- if (err) return app.instance.notify('error', err);
+ if (err) return self.$('.bad-credentials').show();
window.location.reload();
});
View
@@ -4,7 +4,7 @@
<html>
<head>
<meta charset='UTF-8'/>
- <title>Columnist</title>
+ <title>Poole &middot; Serving Jekyll</title>
<link rel='shortcut icon' href='images/favicon.ico' type='image/x-icon' />
<link rel='stylesheet' href='app.css'>
{% include templates.html %}

0 comments on commit aae5b25

Please sign in to comment.