From 3fd9d4bc133719f9e01dd4dfdf6774568e076d6f Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Sun, 3 Apr 2011 22:03:09 -0700 Subject: [PATCH] Remove redundant _submit selectors --- app/views/main/index.html.erb | 2 +- app/views/sessions/new.html.erb | 6 +++--- app/views/users/edit.html.erb | 2 +- public/javascripts/application.js | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 68a1ec3..000969a 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -8,7 +8,7 @@ <%= select_tag "city_state", ''.html_safe, :tabindex => 10 %> <%= label_tag "address", "Address", :id => "address_label" %> <%= text_field_tag "address", params[:address], :tabindex => 11 %> - <%= submit_tag "Find Fire Hydrants", :id => "address_submit", :tabindex => 12 %> + <%= submit_tag "Find fire hydrants", :tabindex => 12 %> <% end %>
<%= image_tag "logos/cfa.png", :alt => "Code for America", :title => "Code for America" %> diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb index 386bc02..966f85b 100644 --- a/app/views/sessions/new.html.erb +++ b/app/views/sessions/new.html.erb @@ -17,18 +17,18 @@ <%= f.text_field "sms_number", :tabindex => 6 %> <%= f.label "password_confirmation", "Choose a password", :id => "user_password_confirmation_label" %> <%= f.password_field "password_confirmation", :tabindex => 7 %> - <%= f.submit "Sign up", :tabindex => 8, :id => "user_sign_up_submit" %> + <%= f.submit "Sign up", :tabindex => 8 %>

By signing up, you agree to the <%= link_to "Terms of Service", "#", :tabindex => 9 %>.

<% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 90c87dc..009161b 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -15,6 +15,6 @@ <%= f.password_field "password", :tabindex => 6 %> <%= f.label "current_password", "Current password", :id => "user_current_password_label" %> (we need your current password to confirm your changes) <%= f.password_field "current_password", :tabindex => 7 %> - <%= f.submit "Update", :tabindex => 8, :id => "user_update_submit" %> + <%= f.submit "Update", :tabindex => 8 %> <% end %> <%= render(:partial => 'hydrants/back') %> diff --git a/public/javascripts/application.js b/public/javascripts/application.js index e426aa5..932d82f 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -66,7 +66,7 @@ $(function() { type: 'GET', url: '/hydrants.json', data: { - 'commit': $('#address_submit').val(), + 'commit': $('#address_form input[type="submit"]').val(), 'utf8': '✓', 'authenticity_token': $('#address_form input[name="authenticity_token"]').val(), 'lat': lat, @@ -136,7 +136,7 @@ $(function() { type: 'GET', url: '/address.json', data: { - 'commit': $('#address_submit').val(), + 'commit': submitButton.val(), 'utf8': '✓', 'authenticity_token': $('#address_form input[name="authenticity_token"]').val(), 'city_state': $('#city_state').val(), @@ -219,7 +219,7 @@ $(function() { type: 'POST', url: '/users.json', data: { - 'commit': $('#user_sign_up_submit').val(), + 'commit': submitButton.val(), 'utf8': '✓', 'authenticity_token': $('#combo_form input[name="authenticity_token"]').val(), 'user': { @@ -304,7 +304,7 @@ $(function() { type: 'POST', url: '/users/sign_in.json', data: { - 'commit': $('#user_sign_in_submit').val(), + 'commit': submitButton.val(), 'utf8': '✓', 'authenticity_token': $('#combo_form input[name="authenticity_token"]').val(), 'user': { @@ -349,7 +349,7 @@ $(function() { type: 'POST', url: '/users/password.json', data: { - 'commit': $('#user_forgot_password_submit').val(), + 'commit': submitButton.val(), 'utf8': '✓', 'authenticity_token': $('#combo_form input[name="authenticity_token"]').val(), 'user': {