This repository has been archived by the owner on Jul 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
backup_form.html.haml
104 lines (97 loc) · 5.17 KB
/
backup_form.html.haml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
= form_for @product, :html => {:multipart => true} do |f|
= f.error_messages
= field_set_tag t('shoppe.products.product_information') do
%dl
%dt= f.label :product_categories, t('shoppe.product_category.product_categories')
%dd= f.collection_select :product_category_ids, Shoppe::ProductCategory.ordered, :id, :name, {:prompt => false}, {:class => 'chosen', :multiple => true, :data => {:placeholder => t('shoppe.product_category.choose_product_category') }}
.splitContainer
%dl.third
%dt= f.label :name, t('shoppe.products.name')
%dd= f.text_field :name, :class => 'text focus'
%dl.third
%dt= f.label :permalink, t('shoppe.products.permalink')
%dd= f.text_field :permalink, :class => 'text'
%dl.third
%dt= f.label :sku, t('shoppe.products.sku')
%dd= f.text_field :sku, :class => 'text'
%dl
%dt= f.label :description, t('shoppe.products.description')
%dd= f.text_area :description, :class => 'text'
%dl
%dt= f.label :short_description, t('shoppe.products.short_description')
%dd= f.text_area :short_description, :class => 'text'
%dl
%dt= f.label :in_the_box, t('shoppe.products.in_the_box')
%dd= f.text_area :in_the_box, :class => 'text'
= field_set_tag t('shoppe.products.attributes') do
.margin
%table.productAttributes
%thead
%tr
%td= t('shoppe.products.name')
%td= t('shoppe.products.value')
%td.searchable= t('shoppe.products.searchable?')
%td.searchable= t('shoppe.products.public?')
%td.remove= t('shoppe.products.remove')
%td
%tbody
%tr.template{:style => 'display:none;'}
%td= text_field_tag 'product[product_attributes_array][][key]', '', :placeholder => t('shoppe.products.name')
%td= text_field_tag 'product[product_attributes_array][][value]', '', :placeholder => t('shoppe.products.value')
%td.searchable= check_box_tag 'product[product_attributes_array][][searchable]', '1'
%td.searchable= check_box_tag 'product[product_attributes_array][][public]', '1'
%td.remove= link_to t('shoppe.remove') , '#', :class => 'button button-mini purple'
%td.handle
- for attribute in @product.product_attributes
%tr
%td= text_field_tag 'product[product_attributes_array][][key]', attribute.key, :placeholder => t('shoppe.products.name')
%td= text_field_tag 'product[product_attributes_array][][value]', attribute.value, :placeholder => t('shoppe.products.value')
%td.searchable= check_box_tag 'product[product_attributes_array][][searchable]', '1', attribute.searchable?
%td.searchable= check_box_tag 'product[product_attributes_array][][public]', '1', attribute.public?
%td.remove= link_to t("shoppe.remove"), '#', :class => 'button button-mini purple'
%td.handle
%p.addAttribute= link_to t('shoppe.products.add_attribute') , '#', :data => {:behavior => 'addAttributeToAttributesTable'}, :class => 'button button-mini green'
= field_set_tag t('shoppe.products.pricing') do
.splitContainer
%dl.third
%dt= f.label :price, t('shoppe.products.price')
%dd
.moneyInput
.currency= Shoppe.settings.currency_unit.html_safe
= f.text_field :price, :class => 'text'
%dl.third
%dt= f.label :cost_price, t('shoppe.products.cost_price')
%dd
.moneyInput
.currency= Shoppe.settings.currency_unit.html_safe
= f.text_field :cost_price, :class => 'text'
%dl.third
%dt= f.label :tax_rate_id, t('shoppe.products.tax_rate')
%dd= f.collection_select :tax_rate_id, Shoppe::TaxRate.ordered, :id, :description, {:include_blank => true}, {:class => 'chosen-with-deselect', :data => {:placeholder => t('shoppe.products.no_tax')}}
= field_set_tag t('shoppe.products.stock_control') do
.splitContainer
%dl.half
%dt= f.label :weight, t('shoppe.products.weight')
%dd= f.text_field :weight, :class => 'text'
%dl.half
%dt= f.label :stock_control, t('shoppe.products.stock_control')
%dd.checkbox
= f.check_box :stock_control
= f.label :stock_control, t('shoppe.products.enable_stock_control?')
= field_set_tag t('shoppe.products.website_properties') do
.splitContainer
%dl.half
%dt= f.label :active, t('shoppe.products.on_sale?')
%dd.checkbox
= f.check_box :active
= f.label :active, t('shoppe.products.on_sale_info')
%dl.half
%dt= f.label :featured, t('shoppe.products.featured?')
%dd.checkbox
= f.check_box :featured
= f.label :featured, t('shoppe.products.featured_info')
%p.submit
- unless @product.new_record?
%span.right= link_to t('shoppe.delete') , @product, :class => 'button purple', :method => :delete, :data => {:confirm => "Are you sure you wish to remove this product?"}
= f.submit t('shoppe.submit'), :class => 'button green'
= link_to t('shoppe.cancel'), :products, :class => 'button'