Skip to content

Commit

Permalink
Replace <% %> with <%= %> for field_container
Browse files Browse the repository at this point in the history
(cherry picked from commit 763652cbec26b0ff75ab0848109733726862e287)
  • Loading branch information
Trung Lê authored and schof committed Jul 12, 2010
1 parent 88dacd5 commit ea285de
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 36 deletions.
6 changes: 3 additions & 3 deletions core/app/views/admin/adjustments/_form.html.erb
@@ -1,19 +1,19 @@
<%= hidden_field :adjustment, :adjustment_source_id, :value => @order.id %>
<%= hidden_field :adjustment, :adjustment_source_type, :value => @order.class %>
<% f.field_container :amount do %>
<%= f.field_container :amount do %>
<%= f.label :amount, t("amount")%> <span class="required">*</span><br />
<%= text_field :adjustment, :amount, {:style => "width:80px;"} %>
<%= f.error_message_on :amount %>
<% end %>
<% f.field_container :type do %>
<%= f.field_container :type do %>
<%= f.label :type, t("type")%> <span class="required">*</span><br />
<%= select_tag "adjustment[type]", grouped_options_for_select(@adjustment_types, @adjustment['type']), { :disabled => (controller.action_name == 'edit')} %>
<%= f.error_message_on :description %>
<% end %>
<% f.field_container :description do %>
<%= f.field_container :description do %>
<%= f.label :description, t("description")%> <span class="required">*</span><br />
<%= text_area :adjustment, :description, {:style=> "height:100px;", :class => 'fullwidth'} %>
<%= f.error_message_on :description %>
Expand Down
4 changes: 2 additions & 2 deletions core/app/views/admin/option_types/_form.html.erb
@@ -1,10 +1,10 @@
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %><br />
<%= f.text_field :name %>
<%= f.error_message_on :name %>
<% end %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :presentation, t("presentation") %><br />
<%= f.text_field :presentation %>
<%= f.error_message_on :presentation %>
Expand Down
10 changes: 5 additions & 5 deletions core/app/views/admin/product_scopes/_form.html.erb
Expand Up @@ -2,19 +2,19 @@
<div class="yui-u first">
<%- locals = {:f => f} %>
<% hook :admin_product_form_left, locals do %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %> <span class="required">*</span><br />
<%= f.text_field :name, :class => 'fullwidth title' %>
<%= f.error_message_on :name %>
<% end %>
<% f.field_container :permalink do %>
<%= f.field_container :permalink do %>
<%= f.label :permalink, t("permalink") %> <span class="required">*</span><br />
<%= f.text_field :permalink, :class => 'fullwidth title' %>
<%= f.error_message_on :permalink %>
<% end %>
<% f.field_container :description do %>
<%= f.field_container :description do %>
<%= f.label :description, t("description")%><br />
<%= f.text_area :description, {:cols => 60, :rows => 4, :class => 'fullwidth'} %>
<%= f.error_message_on :description %>
Expand All @@ -23,13 +23,13 @@
</div>
<div class="yui-u">
<% hook :admin_product_form_right, locals do %>
<% f.field_container :price do %>
<%= f.field_container :price do %>
<%= f.label :price, t("master_price")%> <span class="required">*</span><br />
<%= f.text_field :price, :value => number_with_precision(@product.price, :precision => 2) %>
<%= f.error_message_on :price %>
<% end %>
<% f.field_container :cost_price do %>
<%= f.field_container :cost_price do %>
<%= f.label :cost_price, t("cost_price")%><br />
<%= f.text_field :cost_price, :value => number_with_precision(@product.cost_price, :precision => 2) %>
<%= f.error_message_on :cost_price %>
Expand Down
10 changes: 5 additions & 5 deletions core/app/views/admin/products/_form.html.erb
Expand Up @@ -2,19 +2,19 @@
<div class="yui-u first">
<%- locals = {:f => f} %>
<%= hook :admin_product_form_left, locals do %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %> <span class="required">*</span><br />
<%= f.text_field :name, :class => 'fullwidth title' %>
<%= f.error_message_on :name %>
<% end %>
<% f.field_container :permalink do %>
<%= f.field_container :permalink do %>
<%= f.label :permalink, t("permalink") %> <span class="required">*</span><br />
<%= f.text_field :permalink, :class => 'fullwidth title' %>
<%= f.error_message_on :permalink %>
<% end %>
<% f.field_container :description do %>
<%= f.field_container :description do %>
<%= f.label :description, t("description")%><br />
<%= f.text_area :description, {:cols => 60, :rows => 4, :class => 'fullwidth'} %>
<%= f.error_message_on :description %>
Expand All @@ -23,13 +23,13 @@
</div>
<div class="yui-u">
<%= hook :admin_product_form_right, locals do %>
<% f.field_container :price do %>
<%= f.field_container :price do %>
<%= f.label :price, t("master_price")%> <span class="required">*</span><br />
<%= f.text_field :price, :value => number_with_precision(@product.price, :precision => 2) %>
<%= f.error_message_on :price %>
<% end %>
<% f.field_container :cost_price do %>
<%= f.field_container :cost_price do %>
<%= f.label :cost_price, t("cost_price")%><br />
<%= f.text_field :cost_price, :value => number_with_precision(@product.cost_price, :precision => 2) %>
<%= f.error_message_on :cost_price %>
Expand Down
4 changes: 2 additions & 2 deletions core/app/views/admin/properties/_form.html.erb
@@ -1,10 +1,10 @@
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %><br />
<%= f.text_field :name %>
<%= f.error_message_on :name %>
<% end %>
<% f.field_container :presentation do %>
<%= f.field_container :presentation do %>
<%= f.label :presentation, t("presentation") %><br />
<%= f.text_field :presentation %>
<%= f.error_message_on :presentation %>
Expand Down
2 changes: 1 addition & 1 deletion core/app/views/admin/prototypes/_form.html.erb
@@ -1,4 +1,4 @@
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %><br />
<%= f.text_field :name %>
<%= f.error_message_on :name %>
Expand Down
4 changes: 2 additions & 2 deletions core/app/views/admin/return_authorizations/_form.html.erb
Expand Up @@ -20,13 +20,13 @@
<% end %>
</table>

<% f.field_container :amount do %>
<%= f.field_container :amount do %>
<%= f.label :amount, t("amount")%> <span class="required">*</span><br />
<%= f.text_field :amount, {:style => "width:80px;"} %> <%= t("rma_value") %>: <span id="rma_value"></span>
<%= f.error_message_on :amount %>
<% end %>
<% f.field_container :reason do %>
<%= f.field_container :reason do %>
<%= f.label :reason, t("reason")%>
<%= f.text_area :reason, {:style=> "height:100px;", :class => 'fullwidth'} %>
<%= f.error_message_on :reason %>
Expand Down
6 changes: 3 additions & 3 deletions core/app/views/admin/shipping_methods/_form.html.erb
@@ -1,17 +1,17 @@
<%- locals = {:f => f} %>
<%= hook :admin_shipping_method_form_fields, locals do %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %><br />
<%= f.text_field :name %>
<%= error_message_on :shipping_method, :name %>
<% end %>
<% f.field_container :zone_id do %>
<%= f.field_container :zone_id do %>
<%= f.label :zone_id, t("zone") %><br />
<%= f.collection_select(:zone_id, @available_zones, :id, :name, {}, {"style" => "width:200px"}) %>
<%= error_message_on :shipping_method, :zone_id %>
<% end %>
<% f.field_container :display_on do %>
<%= f.field_container :display_on do %>
<%= f.label :display_on, t("display") %><br />
<%= select(:shipping_method, :display_on, ShippingMethod::DISPLAY.collect {|display| [t(display), display == :both ? nil : display.to_s]}) %>
<%= error_message_on :shipping_method, :display_on %>
Expand Down
4 changes: 2 additions & 2 deletions core/app/views/admin/states/_form.html.erb
@@ -1,9 +1,9 @@
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %><br />
<%=f.text_field :name %>
<% end %>
<% f.field_container :abbr do %>
<%= f.field_container :abbr do %>
<%= f.label :abbr, t("abbreviation") %><br />
<%= f.text_field :abbr %>
<% end %>
6 changes: 3 additions & 3 deletions core/app/views/admin/tax_categories/_form.html.erb
@@ -1,12 +1,12 @@
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name")%><br />
<%=f.text_field :name %>
<% end %>
<% f.field_container :description do %>
<%= f.field_container :description do %>
<%= f.label :description, t("description")%><br />
<%=f.text_field :description %>
<% end %>
<% f.field_container :is_default do %>
<%= f.field_container :is_default do %>
<%= f.label :is_default, t("default")%><br />
<%=f.check_box :is_default %>
<% end %>
2 changes: 1 addition & 1 deletion core/app/views/admin/taxonomies/_form.html.erb
@@ -1,5 +1,5 @@
<%= hook :admin_inside_taxonomy_form do %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %> <span class="required">*</span><br />
<%= error_message_on :taxonomy, :name, :class => 'fullwidth title' %>
<%= text_field :taxonomy, :name %>
Expand Down
8 changes: 4 additions & 4 deletions core/app/views/admin/taxons/_form.html.erb
@@ -1,21 +1,21 @@
<%= hook :admin_inside_taxon_form do %>
<% f.field_container :name do %>
<%= f.field_container :name do %>
<%= f.label :name, t("name") %> <span class="required">*</span><br />
<%= error_message_on :taxon, :name, :class => 'fullwidth title' %>
<%= text_field :taxon, :name %>
<% end %>
<% f.field_container :permalink_part do %>
<%= f.field_container :permalink_part do %>
<%= f.label :permalink_part, t("permalink") %><span class="required">*</span><br />
<%= @taxon.permalink.split("/")[0...-1].join("/") + "/" %><%= text_field_tag :permalink_part, @permalink_part %>
<% end %>
<% f.field_container :icon do %>
<%= f.field_container :icon do %>
<%= f.label :icon, t('icon') %><br />
<%= f.file_field :icon %>
<% end %>
<% f.field_container :icon do %>
<%= f.field_container :icon do %>
<%= f.label :description, t(:description) %><br />
<%= f.text_area :description %></p>
<% end %>
Expand Down
6 changes: 3 additions & 3 deletions core/app/views/admin/users/_form.html.erb
@@ -1,18 +1,18 @@
<%- locals = {:f => f} %>
<%= hook :admin_user_form_fields, locals do %>
<% f.field_container :email do %>
<%= f.field_container :email do %>
<%= f.label :email, t("email") %><br />
<%= f.text_field :email %>
<%= error_message_on :user, :email%>
<% end %>
<% f.field_container :password do %>
<%= f.field_container :password do %>
<%= f.label :password, t("password") %><br />
<%= f.password_field :password %>
<%= f.error_message_on :password %>
<% end %>
<% f.field_container :password do %>
<%= f.field_container :password do %>
<%= f.label :password_confirmation, t(:confirm_password) %><br />
<%= f.password_field :password_confirmation %>
<%= f.error_message_on :password_confirmation %>
Expand Down

0 comments on commit ea285de

Please sign in to comment.