From 8a2aa5d217c0c1ffb07a39b523cd3625ade11fde Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 6 Nov 2010 12:04:24 +0000 Subject: [PATCH] Disable button to prevent accidental double click on project members (#6826). 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/projects/settings/_members.rhtml b/app/views/projects/settings/_members.rhtml index d1c16756..7930c527 100644 --- a/app/views/projects/settings/_members.rhtml +++ b/app/views/projects/settings/_members.rhtml @@ -55,7 +55,9 @@
<% 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| %>
<%=l(:label_member_new)%>

<%= label_tag "principal_search", l(:label_principal_search) %><%= text_field_tag 'principal_search', nil %>

@@ -75,7 +77,7 @@ <% end %>

-

<%= submit_tag l(:button_add) %>

+

<%= submit_tag l(:button_add), :id => 'member-add-submit' %>

<% end %> <% end %>