Fixes #18587, #18588 - Fix 'multipart form data' IE bug
According to this bug [1] multipart form data is malformed if there are fields without names. It been solved within Edge browser, however no solution is expected for IE10/IE11
It cause a failure with Rack - EOFError: bad content body, therefore pages like domains and subnet create/edit cannot be submitted (and all other forms which are submitted via ajax with multipart form data, and an unnamed field within).
This is identical to https://github.com/theforeman/foreman/pull/4125 but moves the workaround to an own helper function and calls the function in every submit_or_cancel invocation, thus fixing all forms which use the two-pane layout.
Fixes #18587, #18588 - Fix 'multipart form data' IE bug
According to this bug [1] multipart form data is malformed if there
are fields without names. It been solved within Edge browser, however
no solution is expected for IE10/IE11
It cause a failure with Rack - EOFError: bad content body, therefore
pages like domains and subnet create/edit cannot be submitted (and all
other forms which are submitted via ajax with multipart form data, and
an unnamed field within).
This is identical to https://github.com/theforeman/foreman/pull/4125
but moves the workaround to an own helper function and calls the
function in every submit_or_cancel invocation, thus fixing all forms
which use the two-pane layout.
[1] https://connect.microsoft.com/IE/Feedback/Details/868498