From: Tom Hughes Date: Sun, 10 Jun 2007 23:22:56 +0000 (+0000) Subject: User form_tag/end instead of start_form_tag/end_form_tag to avoid X-Git-Tag: live~8422 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/aa52ebe6749ba1ea43030f173bfe2101d0f77dc3?ds=sidebyside User form_tag/end instead of start_form_tag/end_form_tag to avoid deprecation warnings. --- diff --git a/app/views/diary_entry/new.rhtml b/app/views/diary_entry/new.rhtml index ead58944c..d0a58cec5 100644 --- a/app/views/diary_entry/new.rhtml +++ b/app/views/diary_entry/new.rhtml @@ -1,7 +1,7 @@ <%= error_messages_for 'diary_entry' %> -<%= start_form_tag :controller => 'diary_entry', :action => 'new' %> +<% form_tag :controller => 'diary_entry', :action => 'new' do %> subject<%= text_field 'diary_entry', 'title' %>
body<%= text_area 'diary_entry', 'body' %>
<%= submit_tag 'Save' %> -<% end_form_tag %> +<% end %> diff --git a/app/views/message/new.rhtml b/app/views/message/new.rhtml index 4075d543e..6e268e905 100644 --- a/app/views/message/new.rhtml +++ b/app/views/message/new.rhtml @@ -9,11 +9,11 @@ <%= error_messages_for 'message' %> -<%= start_form_tag :controller => 'message', :action => 'new' %> +<% form_tag :controller => 'message', :action => 'new' do %> subject: <%= text_field 'message', 'title' %>
body: <%= text_area 'message', 'body' %>
<%= submit_tag 'Send' %> -<% end_form_tag %> +<% end %>
diff --git a/app/views/message/read.rhtml b/app/views/message/read.rhtml index 1e2a3bf5b..d20417e14 100644 --- a/app/views/message/read.rhtml +++ b/app/views/message/read.rhtml @@ -11,6 +11,6 @@ <%= link_to 'reply', :controller => 'message', :action => 'new', :user_id => @message.from_user_id %> -<%= start_form_tag :controller => 'message', :action => 'mark', :message_id => @message.id %> +<% form_tag :controller => 'message', :action => 'mark', :message_id => @message.id do %> <%= submit_tag 'Mark as read' %> - +<% end %> diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index d540836d7..31b8fcd70 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -1,11 +1,11 @@
- <%= start_form_tag :controller => 'geocoder', :action => 'search' %> + <% form_tag :controller => 'geocoder', :action => 'search' do %> <%= text_field 'query', 'postcode' %> <%= text_field 'query', 'place_name'%> <%= submit_tag 'Search' %> - <%= end_form_tag %> + <% end %>
Geolocation provided by npemap.org.uk, diff --git a/app/views/trace/mine.rhtml b/app/views/trace/mine.rhtml index e403d591b..a626e2b51 100644 --- a/app/views/trace/mine.rhtml +++ b/app/views/trace/mine.rhtml @@ -14,7 +14,7 @@ <% if @user %> -<%= start_form_tag({:action => 'create'}, :multipart => true) %> +<% form_tag({:action => 'create'}, :multipart => true) do %>
@@ -26,7 +26,7 @@
upload GPX file:<%= file_field('trace', 'gpx_file', {:size => 50, :maxlength => 255}) %>
-<%= end_form_tag %> +<% end %> <%= render (:partial => 'trace_paging_nav') %> diff --git a/app/views/user/account.rhtml b/app/views/user/account.rhtml index bbede9fed..eafa2d5f4 100644 --- a/app/views/user/account.rhtml +++ b/app/views/user/account.rhtml @@ -1,6 +1,6 @@

User details

<%= error_messages_for 'user' %> -<%= start_form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name %> +<% form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name do %>
@@ -18,7 +18,7 @@
Name<%= @user.email %>
Mapper since<%= @user.creation_time %> (<%= time_ago_in_words(@user.creation_time) %> ago)
Description<%= text_area :user, :description, :value => @user.description, :class => "editDescription" %>
<%= submit_tag 'Save Changes' %> -<%= end_form_tag %> +<% end %> <% nearest_str = "" %> <% if @user.home_lat and @user.home_lon %> @@ -213,7 +213,7 @@ window.onload = init; <% else %> Currently your edits are anonymous and people can't find out where you are located. To show what you edited and allow people to contact you through the website, click the button below. This action cannot be reversed.

- <%= start_form_tag :controller => 'user', :action => 'go_public'%> + <% form_tag :controller => 'user', :action => 'go_public' do %> <%= submit_tag 'Make all my edits public, forever' %> - <%= end_form_tag %> + <% end %> <% end %> diff --git a/app/views/user/edit.rhtml b/app/views/user/edit.rhtml index 65f028f16..a5ef3c799 100644 --- a/app/views/user/edit.rhtml +++ b/app/views/user/edit.rhtml @@ -1,6 +1,6 @@

Edit details:

<%= error_messages_for 'user' %> -<%= start_form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name %> +<% form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name do %> @@ -9,5 +9,4 @@
display name<%= text_field :user, :display_name, :value => @user.display_name %>
description<%= text_area :user, :description, :value => @user.description %>
<%= submit_tag 'Change' %> -<%= end_form_tag %> - +<% end %> diff --git a/app/views/user/lost_password.rhtml b/app/views/user/lost_password.rhtml index ab60cd845..003b256b2 100644 --- a/app/views/user/lost_password.rhtml +++ b/app/views/user/lost_password.rhtml @@ -1,8 +1,9 @@

Forgotten Password?


-<%= start_form_tag :action => 'lost_password' %> +<% form_tag :action => 'lost_password' do %>
email address:<%= text_field('user', 'email', {:size => 50, :maxlength => 255} ) %>

+<% end %> diff --git a/app/views/user/new.rhtml b/app/views/user/new.rhtml index 409e30a65..242c27548 100644 --- a/app/views/user/new.rhtml +++ b/app/views/user/new.rhtml @@ -5,7 +5,7 @@ By creating an account, you agree that all work uploaded to openstreetmap.org an <%= error_messages_for 'user' %> -<%= start_form_tag :action => 'save' %> +<% form_tag :action => 'save' do %> @@ -16,5 +16,4 @@ By creating an account, you agree that all work uploaded to openstreetmap.org an
-<%= end_form_tag %> - +<% end %> diff --git a/app/views/way_tag/search.rhtml b/app/views/way_tag/search.rhtml index 2a475fda9..820bad7db 100644 --- a/app/views/way_tag/search.rhtml +++ b/app/views/way_tag/search.rhtml @@ -1,10 +1,10 @@

Search results

fixme postcodes and geonames -<%= start_form_tag :controller => 'way_tag', :action => 'search' %> +<% form_tag :controller => 'way_tag', :action => 'search' do %> <%= text_field 'query', 'query'%> <%= submit_tag 'Search' %> -<%= end_form_tag %> +<% end %>
email:<%= text_field('user', 'email',{:size => 50, :maxlength => 255}) %>
login name<%= text_field('user', 'display_name',{:size => 50, :maxlength => 255}) %>