diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 37f559c1bedcd4fa82703f97475c2588ef2f4688..c72d0140bb9c9faf15a6aa1f7b052d985279b1f0 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -157,9 +157,6 @@
   });
 
   $('.import_git').click(function( event ) {
-    if($('#project_import_url').attr('disabled')) {
-      $('#project_import_url').attr('disabled', false);
-    } else {
-      $('#project_import_url').attr('disabled', true);
-    }
+    $projectImportUrl = $('#project_import_url')
+    $projectImportUrl.attr('disabled', !$projectImportUrl.attr('disabled'))
   });
\ No newline at end of file