summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus G Thiel <linus@yesbabyyes.se>2016-10-06 11:31:01 +0200
committerLinus G Thiel <linus@yesbabyyes.se>2016-10-20 23:38:20 +0200
commita82a80aa4e7841f8474cc25c21bb6d93b0eaee92 (patch)
treeaf030f3bd22d4340d3d2106b0a95ef83995c496b
parent60eca5f7b5e38c09c8170682852c497c410a96ac (diff)
downloadgitlab-ce-a82a80aa4e7841f8474cc25c21bb6d93b0eaee92.tar.gz
Trim project_path whitespace on form submit
When the form is submitted, any leading and/or trailing whitespace is trimmed.
-rw-r--r--CHANGELOG.md1
-rw-r--r--app/views/projects/new.html.haml5
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 73dc323e02c..25f2a3777e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@ Please view this file on the master branch, on stable branches it's out of date.
## 8.14.0 (2016-11-22)
- Adds user project membership expired event to clarify why user was removed (Callum Dryden)
+ - Trim leading and trailing whitespace on project_path (Linus Thiel)
- Fix HipChat notifications rendering (airatshigapov, eisnerd)
- Simpler arguments passed to named_route on toggle_award_url helper method
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 399ccf15b7f..932603f03b0 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -127,6 +127,11 @@
}
});
+ $('#new_project').submit(function(){
+ var $path = $('#project_path');
+ $path.val($path.val().trim());
+ });
+
$('#project_path').keyup(function(){
if($(this).val().length !=0) {
$('.btn_import_gitlab_project').attr('disabled', false);