diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2016-10-20 23:54:06 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2016-10-20 23:54:06 +0000 |
commit | b7170277c65fb76b5d0d732ab598eb475b0d823c (patch) | |
tree | af030f3bd22d4340d3d2106b0a95ef83995c496b | |
parent | 60eca5f7b5e38c09c8170682852c497c410a96ac (diff) | |
parent | a82a80aa4e7841f8474cc25c21bb6d93b0eaee92 (diff) | |
download | gitlab-ce-b7170277c65fb76b5d0d732ab598eb475b0d823c.tar.gz |
Merge branch '3212-trim-white-space-at-start-and-end-when-creating-new-project' into 'master'
Trim project_path whitespace on form submit
## What does this MR do?
Trim leading/trailing whitespace on project_path input when focus leaves.
## Are there points in the code the reviewer needs to double check?
If tests are deemed necessary?
## Why was this MR needed?
To handle a reported bug #3212.
## Screenshots (if relevant)
## Does this MR meet the acceptance criteria?
- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
- [ ] Added for this feature/bug
- [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)
## What are the relevant issue numbers?
Closes #3212
See merge request !6710
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | app/views/projects/new.html.haml | 5 |
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); |