]> source.dussan.org Git - redmine.git/commitdiff
scm: refactor projects/settings/_repository.rhtml.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 4 May 2011 06:35:49 +0000 (06:35 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 4 May 2011 06:35:49 +0000 (06:35 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5631 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings/_repository.rhtml

index 52aefd6dc98c378ae6768a958aeb8129470b777a..864626809cf3aeaa837735611d2bf8185bfc6d76 100644 (file)
@@ -6,8 +6,14 @@
 <%= error_messages_for 'repository' %>
 
 <div class="box tabular">
-<p><%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %></p>
-<%= repository_field_tags(f, @repository) if @repository %>
+<p>
+<%= label_tag('repository_scm', l(:label_scm)) %><%= scm_select_tag(@repository) %>
+</p>
+<% button_disabled = true %>
+<% if @repository %>
+<%   button_disabled = false %>
+<%=    repository_field_tags(f, @repository)%>
+<% end %>
 </div>
 
 <div class="contextual">
@@ -27,5 +33,5 @@
 </div>
 
 <%= submit_tag((@repository.nil? || @repository.new_record?) ? l(:button_create) : l(:button_save),
-               :disabled => @repository.nil?) %>
+               :disabled => button_disabled) %>
 <% end %>