Commit bad8766a116471895981c18d724ed11042f1907c
1 parent
d552ea62
Exists in
master
and in
22 other branches
Update every old syntax of form_for and javascript_tag
Showing
13 changed files
with
13 additions
and
13 deletions
Show diff stats
app/views/invite/_dialog_wait_loading.html.erb
app/views/manage_products/_certifiers_for_selection.html.erb
app/views/manage_products/_display_name.html.erb
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <h2><%= @product.name_with_unit %></h2> |
3 | 3 | <%= edit_product_link_to_remote(@product, 'name', _('Edit name and unit'), :title => _('Click here to edit the name of your product and the unit')) %> |
4 | 4 | </div> |
5 | -<% javascript_tag do %> | |
5 | +<%= javascript_tag do %> | |
6 | 6 | $$('#display-product-category .hierarchy-category')[0].update('<%= |
7 | 7 | escape_javascript(hierarchy_category_navigation( |
8 | 8 | @product.product_category, | ... | ... |
app/views/manage_products/_edit_input.html.erb
1 | -<%= form_for(@input, :url => {:controller => 'manage_products', :action => 'edit_input', :id => @input}, | |
1 | +<%= form_for(:input, :url => {:controller => 'manage_products', :action => 'edit_input', :id => @input}, | |
2 | 2 | :html => {:method => 'post', :id => "edit-input-#{ @input.id }-form"}) do |f| %> |
3 | 3 | |
4 | 4 | <%= hidden_field_tag 'input-bar-update-url', @input.product.price_composition_bar_display_url, :class => 'bar-update-url' %> | ... | ... |
app/views/manage_products/_form.html.erb
1 | 1 | <%= error_messages_for :product %> <br/> |
2 | 2 | |
3 | -<%= form_for :product, @product, :html => {:multipart => true }, :url => {:action => mode} do |f| %> | |
3 | +<%= form_for :product, :html => {:multipart => true }, :url => {:action => mode} do |f| %> | |
4 | 4 | <%= required_fields_message %> |
5 | 5 | |
6 | 6 | <%= display_form_field( _('Name:'), f.text_field(:name) ) %> | ... | ... |
app/views/manage_products/_price_composition_bar.html.erb
app/views/manage_products/new.html.erb
app/views/profile/report_abuse.html.erb
1 | -<%= form_for @abuse_report, :url => {:action => 'register_report'}, | |
1 | +<%= form_for :abuse_report, :url => {:action => 'register_report'}, | |
2 | 2 | :html => {:onsubmit => "return send_request(this)", :id => 'report-abuse-form'} do |f| %> |
3 | 3 | <%= labelled_form_field('* ' + _('Report reasons'), f.text_area(:reason, :rows => 6, :cols => 60, :class => 'required')) %> |
4 | 4 | <%= hidden_field_tag(:content_type, params[:content_type]) %> | ... | ... |
app/views/search/_image.html.erb
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <% if ['jpg', 'jpeg', 'gif', 'png', 'tiff', 'svg'].include? extension %> |
6 | 6 | <%= link_to '', image.view_url, :class => "search-image-pic", :style => 'background-image: url(%s)'% image.public_filename(:thumb) %> |
7 | 7 | <% if image.width && image.height %> |
8 | - <% javascript_tag do %> | |
8 | + <%= javascript_tag do %> | |
9 | 9 | image = jQuery('script').last().parent().find('.search-image-pic'); |
10 | 10 | des_width = parseInt(image.css('width')); |
11 | 11 | des_height = parseInt(image.css('height')); | ... | ... |
app/views/search/search_page.html.erb
app/views/shared/_dialog_error_messages.html.erb
app/views/shared/_numbers_only_javascript.html.erb
app/views/shared/_redirect_via_javascript.html.erb