Skip to content

Commit

Permalink
make admin views compatible with bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Moreno committed Nov 26, 2015
1 parent 5a97506 commit 6f918d8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
5 changes: 3 additions & 2 deletions app/overrides/add_admin_product_form_fields.rb
@@ -1,5 +1,6 @@
Deface::Override.new(:virtual_path => "spree/admin/products/_form",
:name => "product_assembly_admin_product_form_right",
:insert_after => "[data-hook='admin_product_form_right'], #admin_product_form_right[data-hook]",
:insert_after => "[data-hook='admin_product_form_description']",
:partial => "spree/admin/products/product_assembly_fields",
:disabled => false)
:original => "eb9ecf7015fa51bb0adf7dafd7e6fdf1d652025d",
:disabled => false)
25 changes: 14 additions & 11 deletions app/views/spree/admin/products/_product_assembly_fields.html.erb
@@ -1,14 +1,17 @@
<div class="left six columns alpha">
<div class="field">
<%= f.label :can_be_part, Spree.t(:can_be_part)%>
<%= f.check_box(:can_be_part) %>
</div>
<div data-hook="admin_product_form_can_be_part">
<%= f.field_container :can_be_part, class: ['form-group'] do %>
<%= f.label :can_be_part %>
<%= f.error_message_on :can_be_part %>
<%= f.check_box :can_be_part, class: 'form-control' %>
<% end %>
</div>
<div class="right six columns omega">
<div class="field">
<%= f.label :individual_sale, Spree.t(:individual_sale)%>
<%= f.check_box(:individual_sale) %>
</div>

<div data-hook="admin_product_form_individual_sale">
<%= f.field_container :individual_sale, class: ['form-group'] do %>
<%= f.label :individual_sale %>
<%= f.error_message_on :individual_sale %>
<%= f.check_box :individual_sale, class: 'form-control' %>
<% end %>
</div>

<% if @product.assembly? %>
Expand All @@ -20,4 +23,4 @@
});
</script>
<% end %>
<% end %>
<% end %>

0 comments on commit 6f918d8

Please sign in to comment.