Commit 192615275fd81bad06f4fdfa5148cf785da46dd4

Authored by Victor Costa
1 parent 79d0e8ba

rails3: output the results of form_tag

app/views/account/accept_terms.html.erb
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 15
16 <div id='terms-of-enterprise-use' class='height: 200px; overflow: auto;'><%= @terms_of_enterprise_use %></div> 16 <div id='terms-of-enterprise-use' class='height: 200px; overflow: auto;'><%= @terms_of_enterprise_use %></div>
17 17
18 - <% form_tag :action => 'activate_enterprise' do %> 18 + <%= form_tag :action => 'activate_enterprise' do %>
19 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %> 19 <%= hidden_field_tag :enterprise_code, params[:enterprise_code] %>
20 <%= hidden_field_tag :answer, params[:answer] %> 20 <%= hidden_field_tag :answer, params[:answer] %>
21 21
app/views/account/change_password.html.erb
1 <h1><%= _('Change password') %></h1> 1 <h1><%= _('Change password') %></h1>
2 2
3 -<% form_tag do %> 3 +<%= form_tag do %>
4 4
5 <p><label for="password"><%= _('Current password') %></label><br/> 5 <p><label for="password"><%= _('Current password') %></label><br/>
6 <%= password_field_tag :current_password %></p> 6 <%= password_field_tag :current_password %></p>
app/views/account/forgot_password.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <%= error_messages_for :change_password, :header_message => _('Instructions to password recovery could not be sent'), :message => nil %> 3 <%= error_messages_for :change_password, :header_message => _('Instructions to password recovery could not be sent'), :message => nil %>
4 4
5 -<% form_tag do %> 5 +<%= form_tag do %>
6 <%= labelled_form_field fields_label, text_field_tag(:value) %> 6 <%= labelled_form_field fields_label, text_field_tag(:value) %>
7 7
8 <div> 8 <div>
app/views/admin_panel/set_portal_community.html.erb
1 <h1> <%= _('Set Environment Portal') %></h1> 1 <h1> <%= _('Set Environment Portal') %></h1>
2 2
3 <% if @portal_community.new_record? %> 3 <% if @portal_community.new_record? %>
4 - <% form_tag do %> 4 + <%= form_tag do %>
5 <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %> 5 <%= labelled_form_field(_('Portal identifier'), text_field_tag('portal_community_identifier', @portal_community.identifier, :size => 40) ) %>
6 6
7 <% button_bar do %> 7 <% button_bar do %>
app/views/admin_panel/set_portal_folders.html.erb
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <%= button :up, _('Remove'), '#', { :id => 'remove' } %> 28 <%= button :up, _('Remove'), '#', { :id => 'remove' } %>
29 </div> 29 </div>
30 30
31 -<% form_tag do %> 31 +<%= form_tag do %>
32 <div id='portal-folders'> 32 <div id='portal-folders'>
33 <%= labelled_form_field(_('Portal folders'), select_tag( 'folders[]', options_from_collection_for_select(@selected, :id, :name, nil), {:id => 'selected-folders', :multiple => true, :size => 6 })) %> 33 <%= labelled_form_field(_('Portal folders'), select_tag( 'folders[]', options_from_collection_for_select(@selected, :id, :name, nil), {:id => 'selected-folders', :multiple => true, :size => 6 })) %>
34 </div> 34 </div>
app/views/box_organizer/add_block.html.erb
1 <div id="add-block-dialog"> 1 <div id="add-block-dialog">
2 - <% form_tag do %> 2 + <%= form_tag do %>
3 3
4 <p><%= _('In what area do you want to put your new block?') %></p> 4 <p><%= _('In what area do you want to put your new block?') %></p>
5 5
app/views/cms/publish.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <% end %> 15 <% end %>
16 16
17 -<% form_tag do%> 17 +<%= form_tag do%>
18 <%= hidden_field_tag :back_to, @back_to %> 18 <%= hidden_field_tag :back_to, @back_to %>
19 <% @groups.each do |group| %> 19 <% @groups.each do |group| %>
20 <%= labelled_check_box group.name, "marked_groups[#{group.id}][group_id]", group.id, @marked_groups.include?(group) %><br /> 20 <%= labelled_check_box group.name, "marked_groups[#{group.id}][group_id]", group.id, @marked_groups.include?(group) %><br />
app/views/cms/publish_on_portal_community.html.erb
1 <% if environment.portal_community %> 1 <% if environment.portal_community %>
2 <h1><%= _("Publish your article on portal community") %></h1> 2 <h1><%= _("Publish your article on portal community") %></h1>
3 3
4 - <% form_tag do%> 4 + <%= form_tag do%>
5 <%= hidden_field_tag :back_to, @back_to %> 5 <%= hidden_field_tag :back_to, @back_to %>
6 <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %> 6 <%= labelled_text_field _('Title') + ': ', :name, @article.name, :style => 'width: 100%' %>
7 7
app/views/enterprise_registration/select_validator.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Select one organization to validate your enterprise registration request. Check the provided information about their validation methodoly and criteria.') %> 4 <%= _('Select one organization to validate your enterprise registration request. Check the provided information about their validation methodoly and criteria.') %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= render :partial => 'hidden_fields' %> 8 <%= render :partial => 'hidden_fields' %>
9 9
10 <table> 10 <table>
app/views/enterprise_validation/details.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 14
15 <p><%= _('If this enterprise passes the criteria to be considered an solidarity enconomy enterprise, you can approve it by click the button below.') %></p> 15 <p><%= _('If this enterprise passes the criteria to be considered an solidarity enconomy enterprise, you can approve it by click the button below.') %></p>
16 16
17 -<% form_tag :action => 'approve', :id => @pending.code do %> 17 +<%= form_tag :action => 'approve', :id => @pending.code do %>
18 <% button_bar do %> 18 <% button_bar do %>
19 <%= submit_button('approve', _('Approve')) %> 19 <%= submit_button('approve', _('Approve')) %>
20 <% end %> 20 <% end %>
@@ -24,7 +24,7 @@ @@ -24,7 +24,7 @@
24 24
25 <p><%= _('If this enterprise does not pass the criteria do be considered, use this form.') %></p> 25 <p><%= _('If this enterprise does not pass the criteria do be considered, use this form.') %></p>
26 26
27 -<% form_tag :action => 'reject', :id => @pending.code do %> 27 +<%= form_tag :action => 'reject', :id => @pending.code do %>
28 <%= labelled_form_field(_('Please provide an explanation for the rejection. This explanation will be sent to the requestor (required).'), text_area_tag('reject_explanation'))%> 28 <%= labelled_form_field(_('Please provide an explanation for the rejection. This explanation will be sent to the requestor (required).'), text_area_tag('reject_explanation'))%>
29 <div> 29 <div>
30 <% button_bar do %> 30 <% button_bar do %>
app/views/favorite_enterprises/add.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Are you sure you want to add %s as your favorite enterprise?') % @favorite_enterprise.name %> 4 <%= _('Are you sure you want to add %s as your favorite enterprise?') % @favorite_enterprise.name %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= hidden_field_tag(:confirmation, 1) %> 8 <%= hidden_field_tag(:confirmation, 1) %>
9 9
10 <%= submit_button(:ok, _("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise") % @favorite_enterprise.name) %> 10 <%= submit_button(:ok, _("Yes, I am sure"), :title => _("I want to add %s as a favorite enterprise") % @favorite_enterprise.name) %>
app/views/favorite_enterprises/remove.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <%= _('Are you sure you want to remove %s from your favorite enterprise list?') % @favorite_enterprise.name %> 8 <%= _('Are you sure you want to remove %s from your favorite enterprise list?') % @favorite_enterprise.name %>
9 </p> 9 </p>
10 10
11 -<% form_tag do %> 11 +<%= form_tag do %>
12 <%= hidden_field_tag(:confirmation, 1) %> 12 <%= hidden_field_tag(:confirmation, 1) %>
13 13
14 <%= submit_button(:ok, _("Yes, I want to remove %s from my favorite enterprise list") % @favorite_enterprise.name) %> 14 <%= submit_button(:ok, _("Yes, I want to remove %s from my favorite enterprise list") % @favorite_enterprise.name) %>
app/views/friends/remove.html.erb
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </em> 14 </em>
15 </p> 15 </p>
16 16
17 -<% form_tag do %> 17 +<%= form_tag do %>
18 <%= hidden_field_tag(:confirmation, 1) %> 18 <%= hidden_field_tag(:confirmation, 1) %>
19 19
20 <%= submit_button(:ok, _("Yes") % @friend.name) %> 20 <%= submit_button(:ok, _("Yes") % @friend.name) %>
app/views/home/index.html.erb
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 54
55 <% if environment.enabled?('search_in_home') %> 55 <% if environment.enabled?('search_in_home') %>
56 <div id='home-search' style='text-align: center'> 56 <div id='home-search' style='text-align: center'>
57 - <% form_tag :controller => 'search', :action => 'index' do %> 57 + <%= form_tag :controller => 'search', :action => 'index' do %>
58 58
59 <div id='search-field' style='text-align: center;'> 59 <div id='search-field' style='text-align: center;'>
60 <%= text_field_tag('query', '', :size => 50) %> 60 <%= text_field_tag('query', '', :size => 50) %>
app/views/invite/select_address_book.html.erb
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 6
7 <h2><%= _('Step 1 of 2: Select address book') %></h2> 7 <h2><%= _('Step 1 of 2: Select address book') %></h2>
8 8
9 -<% form_tag do %> 9 +<%= form_tag do %>
10 10
11 <%= [ 11 <%= [
12 radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', _('Manually (empty field)'), :for => "import_from_manual"), 12 radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', _('Manually (empty field)'), :for => "import_from_manual"),
app/views/invite/select_friends.html.erb
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 <%= _('Indicate which friends you want to invite.') %> 15 <%= _('Indicate which friends you want to invite.') %>
16 </p> 16 </p>
17 17
18 -<% form_tag do %> 18 +<%= form_tag do %>
19 <%= hidden_field_tag(:import_from, @import_from) %> 19 <%= hidden_field_tag(:import_from, @import_from) %>
20 <%= hidden_field_tag(:contact_list, @contact_list.id) %> 20 <%= hidden_field_tag(:contact_list, @contact_list.id) %>
21 21
app/views/profile/join.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Are you sure you want to join %s?') % profile.name %> 4 <%= _('Are you sure you want to join %s?') % profile.name %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= hidden_field_tag('back_to', @back_to) %> 8 <%= hidden_field_tag('back_to', @back_to) %>
9 <%= hidden_field_tag(:confirmation, 1) %> 9 <%= hidden_field_tag(:confirmation, 1) %>
10 <%= submit_button(:ok, _("Yes, I want to join.") % profile.name) %> 10 <%= submit_button(:ok, _("Yes, I want to join.") % profile.name) %>
app/views/profile/leave.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Are you sure you want to leave %s?') % profile.name %> 4 <%= _('Are you sure you want to leave %s?') % profile.name %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= hidden_field_tag(:confirmation, 1) %> 8 <%= hidden_field_tag(:confirmation, 1) %>
9 <%= hidden_field_tag(:back_to, @back_to) %> 9 <%= hidden_field_tag(:back_to, @back_to) %>
10 <%= submit_button(:ok, _("Yes, I want to leave.") % profile.name) %> 10 <%= submit_button(:ok, _("Yes, I want to leave.") % profile.name) %>
app/views/profile_editor/disable.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Are you sure you want to disable %s?') % @to_disable.name %> 4 <%= _('Are you sure you want to disable %s?') % @to_disable.name %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= hidden_field_tag(:confirmation, 1) %> 8 <%= hidden_field_tag(:confirmation, 1) %>
9 <%= submit_button(:ok, _("Yes, I want to disable.")) %> 9 <%= submit_button(:ok, _("Yes, I want to disable.")) %>
10 <%= button(:cancel, _("No, I don't want."), :action => 'index') %> 10 <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
app/views/profile_editor/enable.html.erb
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <%= _('Are you sure you want to enable %s?') % @to_enable.name %> 4 <%= _('Are you sure you want to enable %s?') % @to_enable.name %>
5 </p> 5 </p>
6 6
7 -<% form_tag do %> 7 +<%= form_tag do %>
8 <%= hidden_field_tag(:confirmation, 1) %> 8 <%= hidden_field_tag(:confirmation, 1) %>
9 <%= submit_button(:ok, _("Yes, I want to enable.")) %> 9 <%= submit_button(:ok, _("Yes, I want to enable.")) %>
10 <%= button(:cancel, _("No, I don't want."), :action => 'index') %> 10 <%= button(:cancel, _("No, I don't want."), :action => 'index') %>
app/views/profile_editor/header_footer.html.erb
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 <h1><%= _('Editing header and footer') %></h1> 3 <h1><%= _('Editing header and footer') %></h1>
4 4
5 -<% form_tag do %> 5 +<%= form_tag do %>
6 <div style='width: 90%; margin: auto;'> 6 <div style='width: 90%; margin: auto;'>
7 <% if environment.enabled?('display_header_footer_explanation') %> 7 <% if environment.enabled?('display_header_footer_explanation') %>
8 <div class='explanation'> 8 <div class='explanation'>
app/views/profile_members/_manage_roles.html.erb
1 -<% form_tag :action => 'save_associations' do %> 1 +<%= form_tag :action => 'save_associations' do %>
2 <% @roles.each do |role|%> 2 <% @roles.each do |role|%>
3 <%= content_tag('p', content_tag('b', role.name.pluralize+':'), :style => 'margin-top: 30px; margin-bottom: 0px;') %> 3 <%= content_tag('p', content_tag('b', role.name.pluralize+':'), :style => 'margin-top: 30px; margin-bottom: 0px;') %>
4 <%= text_field_tag('q_'+role.key, nil, :id => 'search_'+role.key) %> 4 <%= text_field_tag('q_'+role.key, nil, :id => 'search_'+role.key) %>
app/views/region_validators/_search.html.erb
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <% for item in @search %> 3 <% for item in @search %>
4 <li> 4 <li>
5 <%= item.name %> 5 <%= item.name %>
6 - <% form_tag :action => 'add', :id => @region do %> 6 + <%= form_tag :action => 'add', :id => @region do %>
7 <%= hidden_field_tag :validator_id, item.id %> 7 <%= hidden_field_tag :validator_id, item.id %>
8 <% button_bar do %> 8 <% button_bar do %>
9 <%= submit_button('add', _('Add')) %> 9 <%= submit_button('add', _('Add')) %>
app/views/tasks/index.html.erb
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 </p> 28 </p>
29 <em><%= _('No pending tasks for %s') % profile.name %></em> 29 <em><%= _('No pending tasks for %s') % profile.name %></em>
30 <% else %> 30 <% else %>
31 - <% form_tag :action => 'close' do%> 31 + <%= form_tag :action => 'close' do%>
32 <% button_bar do %> 32 <% button_bar do %>
33 <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %> 33 <%# FiXME button(:edit, _('View my requests'), :action => 'list_requested') %>
34 <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %> 34 <%# FIXME button('menu-mail', _('Send request'), :action => 'new') %>
app/views/templates/_create_template_form.html.erb
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 </div> 8 </div>
9 <% end %> 9 <% end %>
10 10
11 -<% form_tag do %> 11 +<%= form_tag do %>
12 <%= labelled_text_field(_('Name')+': ', :name)%> 12 <%= labelled_text_field(_('Name')+': ', :name)%>
13 13
14 <% button_bar do %> 14 <% button_bar do %>
app/views/themes/add_css.html.erb
1 <h2><%= _('Add a CSS file') %></h2> 1 <h2><%= _('Add a CSS file') %></h2>
2 2
3 -<% form_tag do %> 3 +<%= form_tag do %>
4 <%= labelled_form_field(_('File name'), text_field_tag('css')) %> 4 <%= labelled_form_field(_('File name'), text_field_tag('css')) %>
5 5
6 <% button_bar do %> 6 <% button_bar do %>
app/views/trusted_sites/edit.html.erb
1 <h2> <%= _("Editing trusted site") %> </h2> 1 <h2> <%= _("Editing trusted site") %> </h2>
2 2
3 -<% form_tag :action => :update do %> 3 +<%= form_tag :action => :update do %>
4 4
5 <%= text_field_tag :site, @site %> 5 <%= text_field_tag :site, @site %>
6 <%= hidden_field_tag :orig_site, @site %> 6 <%= hidden_field_tag :orig_site, @site %>
app/views/trusted_sites/new.html.erb
1 <h2> <%= _("Add a new trusted site") %> </h2> 1 <h2> <%= _("Add a new trusted site") %> </h2>
2 2
3 -<% form_tag :action => :create do %> 3 +<%= form_tag :action => :create do %>
4 4
5 <%= text_field_tag :site, @site %> 5 <%= text_field_tag :site, @site %>
6 6