Browse files

Fixed messages on add view.

  • Loading branch information...
1 parent 9f3cf1b commit 7bcf33fd03998b70edf7149b81ba5c981af16a2b @ricobl ricobl committed Aug 15, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −0 wifimap/media/js/spots.js
  2. +0 −2 wifimap/spots/templates/spots/add.html
View
2 wifimap/media/js/spots.js
@@ -133,8 +133,10 @@ var SpotForm = {
submitted: function(json) {
if ( json.success ) {
location.hash = "#" + json.redirect_to;
+ Message.success(json.message);
} else {
$('#content').html(json.content);
+ Message.error(json.message);
SpotForm.bindSubmit();
};
},
View
2 wifimap/spots/templates/spots/add.html
@@ -1,7 +1,5 @@
<h1>Add Spot</h1>
-{% include "messages.html" %}
-
<form action="{% url spots_add %}" method="post" id="add-spot-form">
{{ form.as_p }}
<p><input type="submit" value="Save" id="submit-spot"></p>

0 comments on commit 7bcf33f

Please sign in to comment.