diff options
author | James Lopez <james@jameslopez.es> | 2016-07-13 17:01:24 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2016-07-13 17:01:24 +0200 |
commit | e2d6521d97289a6e3fbccf6948fe44dcb587a8d4 (patch) | |
tree | cb82c60ee6b4b29a8f66e3797bf8ba65303cd53f | |
parent | dd63955032aeebfa76b774b008820879e7d37353 (diff) | |
download | gitlab-ce-e2d6521d97289a6e3fbccf6948fe44dcb587a8d4.tar.gz |
some JS magic to fix empty URL bug
-rw-r--r-- | app/views/projects/new.html.haml | 10 | ||||
-rw-r--r-- | app/views/shared/_import_form.html.haml | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 9b00bdedc27..37f559c1bed 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -154,4 +154,12 @@ $('.import_gitlab_project').attr('disabled',true); $('.import_gitlab_project').attr('title', 'Project path required.'); } - }) + }); + + $('.import_git').click(function( event ) { + if($('#project_import_url').attr('disabled')) { + $('#project_import_url').attr('disabled', false); + } else { + $('#project_import_url').attr('disabled', true); + } + });
\ No newline at end of file diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index 627814bcfae..65a3a6bddab 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -2,7 +2,7 @@ = f.label :import_url, class: 'control-label' do %span Git repository URL .col-sm-10 - = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git' + = f.text_field :import_url, class: 'form-control', placeholder: 'https://username:password@gitlab.company.com/group/project.git', disabled: true .well.prepend-top-20 %ul |