diff options
author | Linus G Thiel <linus@yesbabyyes.se> | 2016-10-06 12:31:01 +0300 |
---|---|---|
committer | Linus G Thiel <linus@yesbabyyes.se> | 2016-10-21 00:38:20 +0300 |
commit | a82a80aa4e7841f8474cc25c21bb6d93b0eaee92 (patch) | |
tree | af030f3bd22d4340d3d2106b0a95ef83995c496b /app | |
parent | 60eca5f7b5e38c09c8170682852c497c410a96ac (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')
-rw-r--r-- | app/views/projects/new.html.haml | 5 |
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); |