From 6e178af551dd7606fce4191c669a84efcedca59d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?F=C3=A1bi=C3=A1n=20Tam=C3=A1s=20L=C3=A1szl=C3=B3?=
 <tamas.fabian@vengit.com>
Date: Wed, 26 Jun 2013 07:32:38 +0200
Subject: [PATCH] Disable invite button after sending invite

---
 Changelog.md                        | 1 +
 app/views/invitations/new.html.haml | 2 +-
 config/locales/diaspora/en.yml      | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Changelog.md b/Changelog.md
index efa570700b..ad06d2fae1 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -5,6 +5,7 @@
 ## Bug fixes
 * Don't focus comment form on 'show n more comments' [#4265](https://github.com/diaspora/diaspora/issues/4265)
 * Do not render mobile photo view for none-existing photos [#4194](https://github.com/diaspora/diaspora/issues/4194)
+* Disable invite button after sending invite [#4173](https://github.com/diaspora/diaspora/issues/4173)
 
 ## Features
 * Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
diff --git a/app/views/invitations/new.html.haml b/app/views/invitations/new.html.haml
index ec8f5a1b96..5b8eb88a51 100644
--- a/app/views/invitations/new.html.haml
+++ b/app/views/invitations/new.html.haml
@@ -31,4 +31,4 @@
         %br
 
         %p
-          = submit_tag t('.send_an_invitation')
+          = submit_tag t('.send_an_invitation'), :disable_with => t('.sending_invitation')
diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml
index 3abb63d879..ed7e43c6e7 100644
--- a/config/locales/diaspora/en.yml
+++ b/config/locales/diaspora/en.yml
@@ -381,6 +381,7 @@ en:
       to: "To"
       personal_message: "Personal message"
       send_an_invitation: "Send an invitation"
+      sending_invitation: "Sending invitation..."
       send_invitation: "Send invitation"
       paste_link: "Share this link with your friends to invite them to Diaspora*, or email them the link directly."
       codes_left:
-- 
GitLab