Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus G Thiel <linus@yesbabyyes.se>2016-10-06 12:31:01 +0300
committerLinus G Thiel <linus@yesbabyyes.se>2016-10-21 00:38:20 +0300
commita82a80aa4e7841f8474cc25c21bb6d93b0eaee92 (patch)
treeaf030f3bd22d4340d3d2106b0a95ef83995c496b /app/views/projects/new.html.haml
parent60eca5f7b5e38c09c8170682852c497c410a96ac (diff)
Trim project_path whitespace on form submit
When the form is submitted, any leading and/or trailing whitespace is trimmed.
Diffstat (limited to 'app/views/projects/new.html.haml')
-rw-r--r--app/views/projects/new.html.haml5
1 files changed, 5 insertions, 0 deletions
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);