fixed form action not submitting the correct URL

This commit is contained in:
Phil Hughes 2017-07-28 09:00:09 +01:00
parent 082d425b5d
commit 795a63d83f

View file

@ -355,7 +355,12 @@ $(function () {
$(document).trigger('init.scrolling-tabs');
$('form.filter-form').on('submit', function (event) {
const link = document.createElement('a');
link.href = this.action;
const action = `${this.action}${link.search === '' ? '?' : '&'}`;
event.preventDefault();
gl.utils.visitUrl(`${this.action}&${$(this).serialize()}`);
gl.utils.visitUrl(`${action}${$(this).serialize()}`);
});
});