foodsoft/app/views/suppliers/_form.html.haml

30 lines
1.2 KiB
Text
Raw Permalink Normal View History

2012-10-17 20:45:52 +02:00
= simple_form_for @supplier do |f|
2011-05-18 15:52:06 +02:00
- if @supplier.shared_supplier
2013-10-17 16:35:50 +02:00
.alert.alert-info
= t 'suppliers.shared_supplier_note'
2011-05-18 15:52:06 +02:00
= f.hidden_field :shared_supplier_id
= f.input :name
= f.input :address
= f.input :phone
= f.input :phone2
= f.input :fax
= f.input :email
= f.input :url
= f.input :contact_person
= f.input :customer_number
- supplier_categories = SupplierCategory.order(:name)
- if supplier_categories.count > 1
= f.association :supplier_category, collection: supplier_categories, include_blank: false
- if FoodsoftConfig[:use_iban]
= f.input :iban
2011-05-18 15:52:06 +02:00
= f.input :delivery_days
2012-10-17 20:45:52 +02:00
= f.input :order_howto, as: :text, input_html: {rows: 5}
= f.input :note, as: :text, input_html: {rows: 5}
2011-05-18 15:52:06 +02:00
= f.input :min_order_quantity
= render 'shared/custom_form_fields', f: f, type: :supplier
- if @supplier.shared_supplier
= f.input :shared_sync_method, collection: shared_sync_method_collection(@supplier.shared_supplier), input_html: {class: 'input-xlarge'}, include_blank: false, disabled: @supplier.shared_supplier.shared_sync_methods.count < 2
2012-10-17 20:45:52 +02:00
.form-actions
= f.submit class: 'btn'
= link_to t('ui.or_cancel'), suppliers_path