Commit 5a4f5763 authored by James Lopez's avatar James Lopez

fixing issues with project members mapping. Also added some more JS magic to the import page

parent b5f2a7e1
......@@ -131,3 +131,14 @@
var _href = $("a.import_gitlab_project").attr("href");
$(".import_gitlab_project").attr("href", _href + '?namespace_id=' + $("#project_namespace_id").val() + '&path=' + $("#project_path").val());
});
$('.import_gitlab_project').attr('disabled',true)
$('.import_gitlab_project').attr('title', 'Project path required.');
$('#project_path').keyup(function(){
if($(this).val().length !=0) {
$('.import_gitlab_project').attr('disabled', false);
$('.import_gitlab_project').attr('title','');
} else {
$('.import_gitlab_project').attr('disabled',true);
$('.import_gitlab_project').attr('title', 'Project path required.');
}
})
......@@ -57,8 +57,10 @@ module Gitlab
end
def add_new_class(current_key, included_classes_hash, value)
only_except_hash = check_only_and_except(value)
# TODO: refactor this
value = (value.is_a?(Hash) ? value.merge(only_except_hash) : { value => only_except_hash }) if only_except_hash
new_hash = { include: value }
new_hash.merge!(check_only_and_except(value))
included_classes_hash[current_key] = new_hash
end
......
......@@ -49,6 +49,7 @@ module Gitlab
project = Gitlab::ImportExport::ProjectFactory.create(
project_params: project_params, user: @user)
project.path = @project_path
project.name = @project_path
project.save
project
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment