summaryrefslogtreecommitdiff
path: root/app/views/projects/new.html.haml
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-08-01 17:00:55 +0100
committerFilipa Lacerda <filipa@gitlab.com>2017-08-01 17:00:55 +0100
commitba7c65a648d568b1788a4f97b893615c58febca9 (patch)
tree20bbacdb1d1d49345cfe2e72d471b8405422e951 /app/views/projects/new.html.haml
parent54e3361fa822b795e3b8ff47764f38b321f0493d (diff)
downloadgitlab-ce-ba7c65a648d568b1788a4f97b893615c58febca9.tar.gz
Adds export form and enables export button by default
Diffstat (limited to 'app/views/projects/new.html.haml')
-rw-r--r--app/views/projects/new.html.haml22
1 files changed, 2 insertions, 20 deletions
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 081cd3dc4dd..93b59dbccaf 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -67,9 +67,8 @@
%button.btn.js-toggle-button.import_git{ type: "button" }
= icon('git', text: 'Repo by URL')
.import_gitlab_project.has-tooltip{ data: { container: 'body' } }
- - if gitlab_project_import_enabled?
- = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
- = icon('gitlab', text: 'GitLab export')
+ = link_to new_import_gitlab_project_path, class: 'btn btn_import_gitlab_project project-submit' do
+ = icon('gitlab', text: 'GitLab export')
.row
.col-lg-12
@@ -127,9 +126,6 @@
%p Please wait a moment, this page will automatically refresh when ready.
:javascript
- var importBtnTooltip = "Please enter a valid project name.";
- var $importBtnWrapper = $('.import_gitlab_project');
-
$('.how_to_import_link').bind('click', function (e) {
e.preventDefault();
var import_modal = $(this).next(".modal").show();
@@ -144,25 +140,11 @@
$(".btn_import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val());
});
- $('.btn_import_gitlab_project').attr('disabled', $('#project_path').val().trim().length === 0);
- $importBtnWrapper.attr('title', importBtnTooltip);
-
$('#new_project').submit(function(){
var $path = $('#project_path');
$path.val($path.val().trim());
});
- $('#project_path').keyup(function(){
- if($(this).val().trim().length !== 0) {
- $('.btn_import_gitlab_project').attr('disabled', false);
- $importBtnWrapper.attr('title','');
- $importBtnWrapper.removeClass('has-tooltip');
- } else {
- $('.btn_import_gitlab_project').attr('disabled',true);
- $importBtnWrapper.addClass('has-tooltip');
- }
- });
-
$('#project_import_url').disable();
$('.import_git').click(function( event ) {
$projectImportUrl = $('#project_import_url');