2013-12-30 14:34:26 +01:00
|
|
|
- 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'
|
|
|
|
});
|
|
|
|
});
|
2020-06-22 16:25:20 +02:00
|
|
|
|
2013-12-31 13:46:25 +01:00
|
|
|
$(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'
|
|
|
|
});
|
|
|
|
});
|
2013-12-30 14:34:26 +01:00
|
|
|
});
|
|
|
|
|
2014-01-06 23:48:39 +01:00
|
|
|
- title t('.title', order: @order.name)
|
2013-11-25 13:48:54 +01:00
|
|
|
|
2020-06-22 16:25:20 +02:00
|
|
|
%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
|
|
|
|
2013-11-25 13:48:54 +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)
|
2013-11-25 13:48:54 +01:00
|
|
|
|
|
|
|
%p= link_to_top
|