diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 9b00bdedc277002834513e297c66b161cc0a6fb7..37f559c1bedcd4fa82703f97475c2588ef2f4688 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 627814bcfae11e1bf33e59bd0de20090a3f1e1d5..65a3a6bddab3fdd9bbb50a54631eb37a996a0f17 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