Revision 4836a949
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
js/kivi.DeliveryOrder.js | ||
---|---|---|
51 | 51 |
const action = params.action; |
52 | 52 |
const warn_on_duplicates = params.warn_on_duplicates; |
53 | 53 |
const warn_on_reqdate = params.warn_on_reqdate; |
54 |
const form_params = params.form_params; |
|
54 | 55 |
|
55 | 56 |
if (warn_on_duplicates && !ns.check_duplicate_parts()) return; |
56 | 57 |
if (warn_on_reqdate && !ns.check_valid_reqdate()) return; |
... | ... | |
58 | 59 |
var data = $('#order_form').serializeArray(); |
59 | 60 |
data.push({ name: 'action', value: 'DeliveryOrder/' + action }); |
60 | 61 |
|
62 |
if (form_params) { |
|
63 |
if (Array.isArray(form_params)) { |
|
64 |
form_params.forEach(function(item) { |
|
65 |
data.push(item); |
|
66 |
}); |
|
67 |
} else { |
|
68 |
data.push(form_params); |
|
69 |
} |
|
70 |
} |
|
71 |
|
|
61 | 72 |
$.post("controller.pl", data, kivi.eval_json_result); |
62 | 73 |
}; |
63 | 74 |
|
Auch abrufbar als: Unified diff
Records: js-save Aufrufe angepasst und vereinheitlicht