Revision 4836a949
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
js/kivi.Order.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 back_to_caller = params.back_to_caller;
|
|
54 |
const form_params = params.form_params;
|
|
55 | 55 |
|
56 | 56 |
if (warn_on_duplicates && !ns.check_duplicate_parts()) return; |
57 | 57 |
if (warn_on_reqdate && !ns.check_valid_reqdate()) return; |
... | ... | |
59 | 59 |
var data = $('#order_form').serializeArray(); |
60 | 60 |
data.push({ name: 'action', value: 'Order/' + action }); |
61 | 61 |
|
62 |
if (back_to_caller) data.push({ name: 'back_to_caller', value: '1' }); |
|
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 |
} |
|
63 | 71 |
|
64 | 72 |
$.post("controller.pl", data, kivi.eval_json_result); |
65 | 73 |
}; |
Auch abrufbar als: Unified diff
Records: js-save Aufrufe angepasst und vereinheitlicht