spree_core 1.1.2.rc1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/admin/admin.js.erb +3 -16
- data/app/assets/javascripts/admin/checkouts/edit.js +4 -2
- data/app/assets/javascripts/admin/spree_core.js +2 -3
- data/app/models/spree/order.rb +0 -4
- data/app/views/spree/admin/adjustments/_form.html.erb +12 -11
- data/app/views/spree/admin/images/_form.html.erb +17 -15
- data/app/views/spree/admin/mail_methods/_form.html.erb +81 -79
- data/app/views/spree/admin/option_types/_form.html.erb +12 -10
- data/app/views/spree/admin/orders/_add_product.html.erb +5 -2
- data/app/views/spree/admin/orders/_form.html.erb +49 -47
- data/app/views/spree/admin/orders/customer_details/_form.html.erb +44 -44
- data/app/views/spree/admin/payment_methods/_form.html.erb +46 -44
- data/app/views/spree/admin/payments/_form.html.erb +13 -11
- data/app/views/spree/admin/products/_form.html.erb +89 -87
- data/app/views/spree/admin/properties/_form.html.erb +2 -4
- data/app/views/spree/admin/prototypes/_form.html.erb +41 -39
- data/app/views/spree/admin/return_authorizations/_form.html.erb +67 -65
- data/app/views/spree/admin/shared/_head.html.erb +8 -6
- data/app/views/spree/admin/shipments/_form.html.erb +65 -63
- data/app/views/spree/admin/shipping_categories/_form.html.erb +8 -6
- data/app/views/spree/admin/states/_form.html.erb +10 -8
- data/app/views/spree/admin/tax_categories/_form.html.erb +16 -12
- data/app/views/spree/admin/tax_rates/_form.html.erb +21 -19
- data/app/views/spree/admin/taxonomies/_form.html.erb +1 -1
- data/app/views/spree/admin/taxons/_form.html.erb +1 -2
- data/app/views/spree/admin/trackers/_form.html.erb +29 -27
- data/app/views/spree/admin/variants/_form.html.erb +33 -31
- data/app/views/spree/admin/zones/_form.html.erb +27 -25
- data/lib/spree/core/version.rb +1 -1
- metadata +36 -34
- data/app/assets/javascripts/admin/spree.routes.js.erb +0 -30
@@ -1,48 +1,48 @@
|
|
1
|
+
<div data-hook="admin_customer_detail_form_fields">
|
2
|
+
<h3><%= t(:customer_details) %></h3>
|
3
|
+
<table class="index" data-hook="customer_guest">
|
4
|
+
<thead>
|
5
|
+
<th colspan="8"><%= t(:account) %></th>
|
6
|
+
</thead>
|
7
|
+
<tbody>
|
8
|
+
<tr data-hook="customer_fields">
|
9
|
+
<td class="lbl-col"><%= f.label :email, t(:email) + ':' %></td>
|
10
|
+
<td class="val-col" colspan="3"><%= f.email_field :email, :class => 'fullwidth' %></td>
|
11
|
+
<td class="lbl-col"><%= label_tag nil, t(:guest_checkout) %>:</td>
|
12
|
+
<td class="val-col" colspan="3">
|
13
|
+
<% if @order.completed? %>
|
14
|
+
<%= @order.user.nil? ? t(:yes) : t(:no) %>
|
15
|
+
<% else %>
|
16
|
+
<% guest = @order.user.nil? || @order.user.anonymous? %>
|
17
|
+
<label class="sub">
|
18
|
+
<%= radio_button_tag :guest_checkout, true, guest %>
|
19
|
+
<%= t(:yes) %>
|
20
|
+
</label>
|
21
|
+
<label class="sub">
|
22
|
+
<%= radio_button_tag :guest_checkout, false, !guest, :disabled => @order.cart? %>
|
23
|
+
<%= t(:no) %>
|
24
|
+
</label>
|
25
|
+
<%= hidden_field_tag :user_id, @order.user_id %>
|
26
|
+
<% end %>
|
27
|
+
</td>
|
28
|
+
</tr>
|
29
|
+
</tbody>
|
30
|
+
</table>
|
1
31
|
|
2
|
-
<h3><%=
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
</thead>
|
7
|
-
<tbody>
|
8
|
-
<tr data-hook="customer_fields">
|
9
|
-
<td class="lbl-col"><%= f.label :email, t(:email) + ':' %></td>
|
10
|
-
<td class="val-col" colspan="3"><%= f.email_field :email, :class => 'fullwidth' %></td>
|
11
|
-
<td class="lbl-col"><%= label_tag nil, t(:guest_checkout) %>:</td>
|
12
|
-
<td class="val-col" colspan="3">
|
13
|
-
<% if @order.completed? %>
|
14
|
-
<%= @order.user.nil? ? t(:yes) : t(:no) %>
|
15
|
-
<% else %>
|
16
|
-
<% guest = @order.user.nil? || @order.user.anonymous? %>
|
17
|
-
<label class="sub">
|
18
|
-
<%= radio_button_tag :guest_checkout, true, guest %>
|
19
|
-
<%= t(:yes) %>
|
20
|
-
</label>
|
21
|
-
<label class="sub">
|
22
|
-
<%= radio_button_tag :guest_checkout, false, !guest, :disabled => @order.cart? %>
|
23
|
-
<%= t(:no) %>
|
24
|
-
</label>
|
25
|
-
<%= hidden_field_tag :user_id, @order.user_id %>
|
26
|
-
<% end %>
|
27
|
-
</td>
|
28
|
-
</tr>
|
29
|
-
</tbody>
|
30
|
-
</table>
|
32
|
+
<h3><%= Spree::Address.model_name.human(:count => 2) %></h3>
|
33
|
+
<%= f.fields_for :bill_address do |ba_form| %>
|
34
|
+
<%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => ba_form, :name => t(:billing_address), :use_billing => false } %>
|
35
|
+
<% end %>
|
31
36
|
|
32
|
-
|
33
|
-
<%= f
|
34
|
-
|
35
|
-
<% end %>
|
37
|
+
<%= f.fields_for :ship_address do |sa_form| %>
|
38
|
+
<%= render :partial => 'spree/admin/shared/address_form', :locals => { :f => sa_form, :name => t(:shipping_address), :use_billing => true } %>
|
39
|
+
<% end %>
|
36
40
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
<p class="form-buttons" data-hook="buttons">
|
42
|
-
<%= button @order.cart? ? t(:continue) : t(:update) %>
|
43
|
-
</p>
|
44
|
-
|
45
|
-
<% content_for :head do %>
|
46
|
-
<%= javascript_include_tag states_url, 'admin/address_states.js' %>
|
47
|
-
<% end %>
|
41
|
+
<p class="form-buttons" data-hook="buttons">
|
42
|
+
<%= button @order.cart? ? t(:continue) : t(:update) %>
|
43
|
+
</p>
|
48
44
|
|
45
|
+
<% content_for :head do %>
|
46
|
+
<%= javascript_include_tag states_url, 'admin/address_states.js' %>
|
47
|
+
<% end %>
|
48
|
+
</div>
|
@@ -1,50 +1,52 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
<
|
24
|
-
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
</
|
1
|
+
<div data-hook="admin_payment_method_form_fields">
|
2
|
+
<table data-hook="payment_method">
|
3
|
+
<tr data-hook="name">
|
4
|
+
<td><%= label_tag nil, t(:name) %></td>
|
5
|
+
<td><%= text_field :payment_method, :name, {'style' => 'width:200px;'} %></td>
|
6
|
+
</tr>
|
7
|
+
<tr data-hook="description">
|
8
|
+
<td><%= label_tag nil, t(:description) %></td>
|
9
|
+
<td><%= text_area :payment_method, :description, {:cols => 60, :rows => 4} %></td>
|
10
|
+
</tr>
|
11
|
+
<tr data-hook="environment">
|
12
|
+
<td><%= label_tag nil, t(:environment) %></td>
|
13
|
+
<td>
|
14
|
+
<%= collection_select(:payment_method, :environment, Rails.configuration.database_configuration.keys.sort, :to_s, :titleize, {}, {:id => 'gtwy-env'}) %>
|
15
|
+
</td>
|
16
|
+
</tr>
|
17
|
+
<tr data-hook="display">
|
18
|
+
<td><%= label_tag nil, t(:display) %></td>
|
19
|
+
<td>
|
20
|
+
<%= select(:payment_method, :display_on, Spree::PaymentMethod::DISPLAY.collect { |display| [t(display), display == :both ? nil : display.to_s] }) %>
|
21
|
+
</td>
|
22
|
+
</tr>
|
23
|
+
<tr data-hook="active">
|
24
|
+
<td><%= label_tag nil, t(:active) %></td>
|
25
|
+
<td>
|
26
|
+
<label class="sub">
|
27
|
+
<%= radio_button :payment_method, :active, true %>
|
28
|
+
<%= t(:yes) %>
|
29
|
+
</label>
|
30
|
+
<label class="sub">
|
31
|
+
<%= radio_button :payment_method, :active, false %>
|
32
|
+
<%= t(:no) %>
|
33
|
+
</label>
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
</table>
|
36
37
|
|
37
|
-
<h2><%= t(:settings) %></h2>
|
38
|
+
<h2><%= t(:settings) %></h2>
|
38
39
|
|
39
|
-
<div id="preference-settings" data-hook>
|
40
|
-
|
41
|
-
|
40
|
+
<div id="preference-settings" data-hook>
|
41
|
+
<%= f.label :type, t(:provider) %>
|
42
|
+
<%= collection_select(:payment_method, :type, @providers, :to_s, :name, {}, {:id => 'gtwy-type'}) %>
|
42
43
|
|
43
|
-
|
44
|
-
|
44
|
+
<% unless @object.new_record? %>
|
45
|
+
<%= preference_fields(@object, f) %>
|
45
46
|
|
46
|
-
|
47
|
-
|
47
|
+
<% if @object.respond_to?(:preferences) %>
|
48
|
+
<div id="gateway-settings-warning" style="color:#FF0000;"><%= t(:provider_settings_warning) %></div>
|
49
|
+
<% end %>
|
48
50
|
<% end %>
|
49
|
-
|
51
|
+
</div>
|
50
52
|
</div>
|
@@ -1,15 +1,17 @@
|
|
1
|
-
<
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div data-hook="admin_payment_form_fields">
|
2
|
+
<p>
|
3
|
+
<%= f.label :amount, t(:amount) %>
|
4
|
+
<%= f.text_field :amount, :size => 8, :value => @order.outstanding_balance %>
|
5
|
+
</p>
|
5
6
|
|
6
|
-
<% @payment_methods.each do |method| %>
|
7
|
+
<% @payment_methods.each do |method| %>
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
<label data-hook="payment_method">
|
10
|
+
<%= radio_button_tag 'payment[payment_method_id]', method.id, method == @payment_method %>
|
11
|
+
<%= t(method.name, :scope => :payment_methods, :default => method.name) %>
|
12
|
+
</label>
|
12
13
|
|
13
|
-
|
14
|
+
<%= render :partial => "spree/admin/payments/source_forms/#{method.method_type}", :locals => { :payment_method => method } %>
|
14
15
|
|
15
|
-
<% end %>
|
16
|
+
<% end %>
|
17
|
+
</div>
|
@@ -1,104 +1,106 @@
|
|
1
|
-
<div
|
2
|
-
<div class="
|
3
|
-
|
4
|
-
<%= f.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<%= f.field_container :permalink do %>
|
10
|
-
<%= f.label :permalink, t(:permalink) %> <span class="required">*</span><br />
|
11
|
-
<%= f.text_field :permalink, :class => 'fullwidth title' %>
|
12
|
-
<%= f.error_message_on :permalink %>
|
13
|
-
<% end %>
|
1
|
+
<div data-hook="admin_product_form_fields">
|
2
|
+
<div class="clearfix">
|
3
|
+
<div class="left" data-hook="admin_product_form_left">
|
4
|
+
<%= f.field_container :name do %>
|
5
|
+
<%= f.label :name, t(:name) %> <span class="required">*</span><br />
|
6
|
+
<%= f.text_field :name, :class => 'fullwidth title' %>
|
7
|
+
<%= f.error_message_on :name %>
|
8
|
+
<% end %>
|
14
9
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<% end %>
|
20
|
-
</div>
|
21
|
-
<div class="right" data-hook="admin_product_form_right">
|
22
|
-
<%= f.field_container :price do %>
|
23
|
-
<%= f.label :price, t(:master_price) %> <span class="required">*</span><br />
|
24
|
-
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
|
25
|
-
<%= f.error_message_on :price %>
|
10
|
+
<%= f.field_container :permalink do %>
|
11
|
+
<%= f.label :permalink, t(:permalink) %> <span class="required">*</span><br />
|
12
|
+
<%= f.text_field :permalink, :class => 'fullwidth title' %>
|
13
|
+
<%= f.error_message_on :permalink %>
|
26
14
|
<% end %>
|
27
15
|
|
28
|
-
<%= f.field_container :
|
29
|
-
<%= f.label :
|
30
|
-
<%= f.
|
31
|
-
|
32
|
-
|
16
|
+
<%= f.field_container :description do %>
|
17
|
+
<%= f.label :description, t(:description) %><br />
|
18
|
+
<%= f.text_area :description, {:cols => 60, :rows => 4, :class => 'fullwidth'} %>
|
19
|
+
<%= f.error_message_on :description %>
|
20
|
+
<% end %>
|
21
|
+
</div>
|
22
|
+
<div class="right" data-hook="admin_product_form_right">
|
23
|
+
<%= f.field_container :price do %>
|
24
|
+
<%= f.label :price, t(:master_price) %> <span class="required">*</span><br />
|
25
|
+
<%= f.text_field :price, :value => number_to_currency(@product.price, :unit => '') %>
|
26
|
+
<%= f.error_message_on :price %>
|
27
|
+
<% end %>
|
33
28
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
29
|
+
<%= f.field_container :cost_price do %>
|
30
|
+
<%= f.label :cost_price, t(:cost_price) %><br />
|
31
|
+
<%= f.text_field :cost_price, :value => number_to_currency(@product.cost_price, :unit => '') %>
|
32
|
+
<%= f.error_message_on :cost_price %>
|
33
|
+
<% end %>
|
39
34
|
|
40
|
-
|
41
|
-
|
42
|
-
<%= f.
|
43
|
-
<%= f.text_field :
|
35
|
+
<%= f.field_container :available_on do %>
|
36
|
+
<%= f.label :available_on, t(:available_on) %><br />
|
37
|
+
<%= f.error_message_on :available_on %>
|
38
|
+
<%= f.text_field :available_on, :class => 'datepicker' %>
|
44
39
|
<% end %>
|
45
40
|
|
46
|
-
<%
|
47
|
-
<%= f.field_container :
|
48
|
-
<%= f.label :
|
49
|
-
<%= f.
|
41
|
+
<% unless @product.has_variants? %>
|
42
|
+
<%= f.field_container :sku do %>
|
43
|
+
<%= f.label :sku, t(:sku) %><br />
|
44
|
+
<%= f.text_field :sku, :size => 16 %>
|
45
|
+
<% end %>
|
46
|
+
|
47
|
+
<% if Spree::Config[:track_inventory_levels] %>
|
48
|
+
<%= f.field_container :on_hand do %>
|
49
|
+
<%= f.label :on_hand, t(:on_hand) %><br />
|
50
|
+
<%= f.number_field :on_hand, :min => 0 %>
|
51
|
+
<% end %>
|
50
52
|
<% end %>
|
53
|
+
|
54
|
+
<ul id="shipping_specs">
|
55
|
+
<li id="shipping_specs_weight_field">
|
56
|
+
<%= f.label :weight, t(:weight) %>
|
57
|
+
<%= f.text_field :weight, :size => 4 %>
|
58
|
+
</li>
|
59
|
+
<li id="shipping_specs_height_field">
|
60
|
+
<%= f.label :height, t(:height) %>
|
61
|
+
<%= f.text_field :height, :size => 4 %>
|
62
|
+
</li>
|
63
|
+
<li id="shipping_specs_width_field">
|
64
|
+
<%= f.label :width, t(:width) %>
|
65
|
+
<%= f.text_field :width, :size => 4 %>
|
66
|
+
</li>
|
67
|
+
<li id="shipping_specs_depth_field">
|
68
|
+
<%= f.label :depth, t(:depth) %>
|
69
|
+
<%= f.text_field :depth, :size => 4 %>
|
70
|
+
</li>
|
71
|
+
</ul>
|
51
72
|
<% end %>
|
52
73
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
<li id="shipping_specs_depth_field">
|
67
|
-
<%= f.label :depth, t(:depth) %>
|
68
|
-
<%= f.text_field :depth, :size => 4 %>
|
69
|
-
</li>
|
70
|
-
</ul>
|
71
|
-
<% end %>
|
74
|
+
<%= f.field_container :shipping_categories do %>
|
75
|
+
<%= f.label :shipping_category_id, t(:shipping_categories) %><br />
|
76
|
+
<%= f.collection_select(:shipping_category_id, @shipping_categories, :id, :name, { :include_blank => true }, { 'style' => 'width:200px' }) %>
|
77
|
+
<%= f.error_message_on :shipping_category %>
|
78
|
+
<% end %>
|
79
|
+
|
80
|
+
<%= f.field_container :tax_category do %>
|
81
|
+
<%= f.label :tax_category_id, t(:tax_category) %><br />
|
82
|
+
<%= f.collection_select(:tax_category_id, @tax_categories, :id, :name, { :include_blank => true }, { 'style' => 'width:200px' }) %>
|
83
|
+
<%= f.error_message_on :tax_category %>
|
84
|
+
<% end %>
|
85
|
+
</div>
|
86
|
+
</div>
|
72
87
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
<%= f.
|
88
|
+
<h2><%= t(:metadata) %></h2>
|
89
|
+
<div data-hook="admin_product_form_meta">
|
90
|
+
<%= f.field_container :meta_keywords do %>
|
91
|
+
<%= f.label :meta_keywords, t(:meta_keywords) %><br />
|
92
|
+
<%= f.text_field :meta_keywords, :class => 'fullwidth' %>
|
77
93
|
<% end %>
|
78
94
|
|
79
|
-
<%= f.field_container :
|
80
|
-
<%= f.label :
|
81
|
-
<%= f.
|
82
|
-
<%= f.error_message_on :tax_category %>
|
95
|
+
<%= f.field_container :meta_description do %>
|
96
|
+
<%= f.label :meta_description, t(:meta_description) %><br />
|
97
|
+
<%= f.text_field :meta_description, :class => 'fullwidth' %>
|
83
98
|
<% end %>
|
84
99
|
</div>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
<h2><%= t(:metadata) %></h2>
|
88
|
-
<div data-hook="admin_product_form_meta">
|
89
|
-
<%= f.field_container :meta_keywords do %>
|
90
|
-
<%= f.label :meta_keywords, t(:meta_keywords) %><br />
|
91
|
-
<%= f.text_field :meta_keywords, :class => 'fullwidth' %>
|
92
|
-
<% end %>
|
93
|
-
|
94
|
-
<%= f.field_container :meta_description do %>
|
95
|
-
<%= f.label :meta_description, t(:meta_description) %><br />
|
96
|
-
<%= f.text_field :meta_description, :class => 'fullwidth' %>
|
97
|
-
<% end %>
|
98
|
-
</div>
|
99
100
|
|
100
|
-
<div data-hook="admin_product_form_additional_fields">
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
<div data-hook="admin_product_form_additional_fields">
|
102
|
+
<% Spree::Variant.additional_fields.select { |af| af[:only].nil? || af[:only].include?(:product) }.each do |field| %>
|
103
|
+
<%= render :partial => 'spree/admin/shared/additional_field', :locals => { :field => field, :f => f } %>
|
104
|
+
<% end %>
|
105
|
+
</div>
|
104
106
|
</div>
|
@@ -1,5 +1,4 @@
|
|
1
|
-
<div data-hook="
|
2
|
-
|
1
|
+
<div data-hook="admin_property_form_fields">
|
3
2
|
<%= f.field_container :name do %>
|
4
3
|
<%= f.label :name, t(:name) %> <span class="required">*</span><br />
|
5
4
|
<%= f.text_field :name %>
|
@@ -11,5 +10,4 @@
|
|
11
10
|
<%= f.text_field :presentation %>
|
12
11
|
<%= f.error_message_on :presentation %>
|
13
12
|
<% end %>
|
14
|
-
|
15
|
-
</div>
|
13
|
+
</div>
|
@@ -1,44 +1,46 @@
|
|
1
|
-
|
2
|
-
<%= f.
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
<div data-hook="admin_prototype_form_fields">
|
2
|
+
<%= f.field_container :name do %>
|
3
|
+
<%= f.label :name, t(:name) %><br />
|
4
|
+
<%= f.text_field :name %>
|
5
|
+
<%= f.error_message_on :name %>
|
6
|
+
<% end %>
|
6
7
|
|
7
|
-
<h3><%= t(:properties) %></h3>
|
8
|
+
<h3><%= t(:properties) %></h3>
|
8
9
|
|
9
|
-
<ul class='checkbox-list' id='properties' data-hook>
|
10
|
-
<% Spree::Property.sorted.each do |property| %>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
<% end %>
|
23
|
-
</ul>
|
10
|
+
<ul class='checkbox-list' id='properties' data-hook>
|
11
|
+
<% Spree::Property.sorted.each do |property| %>
|
12
|
+
<% selected = if @prototype.new_record?
|
13
|
+
(params[:property] and params[:property][:id] and params[:property][:id].include?(property.id.to_s))
|
14
|
+
else
|
15
|
+
@prototype.properties.include?(property)
|
16
|
+
end %>
|
17
|
+
<li>
|
18
|
+
<label>
|
19
|
+
<%= check_box_tag 'property[id][]', "#{property.id}", selected %>
|
20
|
+
<%= property.name %>
|
21
|
+
</label>
|
22
|
+
</li>
|
23
|
+
<% end %>
|
24
|
+
</ul>
|
24
25
|
|
25
|
-
<hr />
|
26
|
+
<hr />
|
26
27
|
|
27
|
-
<h3><%= t(:option_types) %></h3>
|
28
|
+
<h3><%= t(:option_types) %></h3>
|
28
29
|
|
29
|
-
<ul class="checkbox-list" id="option_types" data-hook>
|
30
|
-
<% Spree::OptionType.all.each do |option_type| %>
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
<% end %>
|
43
|
-
</ul>
|
44
|
-
<hr />
|
30
|
+
<ul class="checkbox-list" id="option_types" data-hook>
|
31
|
+
<% Spree::OptionType.all.each do |option_type| %>
|
32
|
+
<% selected = if @prototype.new_record?
|
33
|
+
(params[:option_type] and params[:option_type][:id] and params[:option_type][:id].include?(option_type.id.to_s))
|
34
|
+
else
|
35
|
+
@prototype.option_types.include?(option_type)
|
36
|
+
end %>
|
37
|
+
<li>
|
38
|
+
<label>
|
39
|
+
<%= check_box_tag 'option_type[id][]', "#{option_type.id}", selected %>
|
40
|
+
<%= option_type.name %>
|
41
|
+
</label>
|
42
|
+
</li>
|
43
|
+
<% end %>
|
44
|
+
</ul>
|
45
|
+
<hr />
|
46
|
+
</div>
|