summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-07-28 09:00:09 +0100
committerPhil Hughes <me@iamphill.com>2017-07-28 09:00:09 +0100
commit795a63d83fa086a1785cfba3d50cc00f08c70967 (patch)
tree3f54ba7dcd1cf1ed879e6d19c80fbbe01228c0c4
parent082d425b5dd0fc46393b48a2e696dedc6418f81a (diff)
downloadgitlab-ce-795a63d83fa086a1785cfba3d50cc00f08c70967.tar.gz
fixed form action not submitting the correct URLph-inline-js
-rw-r--r--app/assets/javascripts/main.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js
index ca126217bda..cd45091c211 100644
--- a/app/assets/javascripts/main.js
+++ b/app/assets/javascripts/main.js
@@ -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()}`);
});
});