diff --git a/polyclinic_scheduling/apps/RUG_template/static/RUG_template/javascript/formdata.min.js b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/javascript/formdata.min.js new file mode 100644 index 0000000..a5fde02 --- /dev/null +++ b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/javascript/formdata.min.js @@ -0,0 +1,18 @@ +;(function(){var k;function m(a){var b=0;return function(){return b + diff --git a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html index dfa42c3..6e77b8c 100644 --- a/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html +++ b/polyclinic_scheduling/apps/schedule/templates/schedule/schedule_new.html @@ -1073,7 +1073,16 @@ formdata.delete('csrfmiddlewaretoken'); formdata.delete('json'); - jQuery('input#id_json').val(JSON.stringify(Object.fromEntries(formdata))); + // Display the key/value pairs. This is needed to support stupid IE. Mici$oft is still having hardtime playing nice :( + let json_data = {}; + var formDataEntries = formdata.entries(), formDataEntry = formDataEntries.next(), pair; + while (!formDataEntry.done) { + pair = formDataEntry.value; + json_data[pair[0]] = pair[1]; + formDataEntry = formDataEntries.next(); + } + + jQuery('input#id_json').val(JSON.stringify(json_data)); return true; } else { alert('Er zijn wat problemen met het formulier. Controleer de invoer velden');