]> source.dussan.org Git - redmine.git/commitdiff
Disable button to prevent accidental double click on project members (#6826).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 6 Nov 2010 12:04:24 +0000 (12:04 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 6 Nov 2010 12:04:24 +0000 (12:04 +0000)
Contributed by Andrew Vit.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4371 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings/_members.rhtml

index d1c1675665ee759ba662c86c8c39369f5a8fda36..7930c527e3e15c482edd310f619847cb0508f403 100644 (file)
@@ -55,7 +55,9 @@
 
 <div class="splitcontentright">
 <% if roles.any? && principals.any? %>
-  <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post) do |f| %>
+  <% remote_form_for(:member, @member, :url => {:controller => 'members', :action => 'new', :id => @project}, :method => :post,
+                                                                          :loading => "$('member-add-submit').disable()",
+                                                                          :complete => "$('member-add-submit').enable()") do |f| %>
     <fieldset><legend><%=l(:label_member_new)%></legend>
     
                <p><%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %></p>
@@ -75,7 +77,7 @@
        <label><%= check_box_tag 'member[role_ids][]', role.id %> <%=h role %></label>
        <% end %></p>
        
-    <p><%= submit_tag l(:button_add) %></p>
+    <p><%= submit_tag l(:button_add), :id => 'member-add-submit' %></p>
                </fieldset>
   <% end %>
 <% end %>