diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1a4c6fd..b990c40 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -65,6 +65,14 @@ color = '/images/markers/<%= hydrant.user_id ? "green" : "red" %>.png'; addMarker(<%= hydrant.id %>, point, color); <% end %> + $('#location_form').submit(function() { + if($('#address').val() === '') { + $('#address').focus(); + $('#address_label').addClass('error', 500); + $('#address').addClass('error', 500); + return false; + } + }); $('#combo_form input[type="radio"]').live('click', function() { var self = $(this); if('new' == self.val()) { diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index a603486..59b81c0 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -19,15 +19,3 @@
-