foodsoft/app/views/orders/receive.html.haml

48 lines
1.5 KiB
Text
Raw Normal View History

- content_for :javascript do
:javascript
$(function() {
// Subscribe to database changes.
// See publish/subscribe design pattern in /doc.
$(document).on('OrderArticle#update', function(e) {
$.ajax({
url: '#{receive_on_order_article_update_order_path(@order)}',
type: 'get',
data: {order_article_id: e.order_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
$(document).on('OrderArticle#create', function(e) {
$.ajax({
url: '#{receive_on_order_article_create_order_path(@order)}',
type: 'get',
data: {order_article_id: e.order_article_id},
contentType: 'application/json; charset=UTF-8'
});
});
});
2014-01-06 23:48:39 +01:00
- title t('.title', order: @order.name)
%p!= t('.paragraph')
2013-12-18 21:06:05 +01:00
= form_tag(receive_order_path(@order)) do
2014-01-06 23:48:39 +01:00
%fieldset#results
2013-12-18 21:06:05 +01:00
= render 'edit_amounts'
2013-11-26 23:48:21 +01:00
.form-actions
2013-11-26 23:48:21 +01:00
.pull-left
2014-01-06 23:48:39 +01:00
%b.checkbox.inline
= t '.surplus_options'
= label_tag :rest_to_tolerance, class: 'checkbox inline' do
2013-11-26 23:48:21 +01:00
= check_box_tag :rest_to_tolerance, 1, true
2014-01-06 23:48:39 +01:00
= t '.consider_member_tolerance'
= label_tag :rest_to_stock, class: 'checkbox inline' do
= check_box_tag :rest_to_stock, 1, false, disabled: true
%span{style: 'color: grey'}= t '.rest_to_stock'
2013-11-26 23:48:21 +01:00
.pull-right
= submit_tag t('.submit'), class: 'btn btn-primary'
2013-12-18 21:06:05 +01:00
= link_to t('ui.or_cancel'), order_path(@order)
%p= link_to_top