From: Toshi MARUYAMA Date: Wed, 4 May 2011 06:35:49 +0000 (+0000) Subject: scm: refactor projects/settings/_repository.rhtml. X-Git-Tag: 1.2.0~258 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fb6c9a1396ec59053e7216a156ba70df6178c05f;p=redmine.git scm: refactor projects/settings/_repository.rhtml. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5631 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/projects/settings/_repository.rhtml b/app/views/projects/settings/_repository.rhtml index 52aefd6dc..864626809 100644 --- a/app/views/projects/settings/_repository.rhtml +++ b/app/views/projects/settings/_repository.rhtml @@ -6,8 +6,14 @@ <%= error_messages_for 'repository' %>
-

<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>

-<%= repository_field_tags(f, @repository) if @repository %> +

+<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %> +

+<% button_disabled = true %> +<% if @repository %> +<% button_disabled = false %> +<%= repository_field_tags(f, @repository)%> +<% end %>
@@ -27,5 +33,5 @@
<%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save), - :disabled => @repository.nil?) %> + :disabled => button_disabled) %> <% end %>