From 26a3f56c2285e1b9ee80c17adb24b271e8497961 Mon Sep 17 00:00:00 2001 From: Titouan Lorieul Date: Wed, 11 Sep 2013 20:49:23 +0200 Subject: [PATCH 1/2] Disables submit button in sign up form after submission to avoid email already exists error --- app/views/registrations/new.html.erb | 2 +- app/views/registrations/new.mobile.haml | 2 +- config/locales/diaspora/en.yml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/registrations/new.html.erb b/app/views/registrations/new.html.erb index 1d6ec1e70..787d9a61c 100644 --- a/app/views/registrations/new.html.erb +++ b/app/views/registrations/new.html.erb @@ -63,7 +63,7 @@ <%= invite_hidden_tag(invite) %> - <%= f.submit t('.continue'), :class => "new-btn" %> + <%= f.submit t('.continue'), :class => "new-btn", :disable_with => t('.submitting') %> <% end %> diff --git a/app/views/registrations/new.mobile.haml b/app/views/registrations/new.mobile.haml index 0f8342325..f7a897caa 100644 --- a/app/views/registrations/new.mobile.haml +++ b/app/views/registrations/new.mobile.haml @@ -45,7 +45,7 @@ = f.password_field :password_confirmation, :placeholder => "••••••••" .controls - = f.submit t('registrations.new.create_my_account'), :class => 'btn primary' + = f.submit t('registrations.new.create_my_account'), :class => 'btn primary', :disable_with => t('registrations.new.submitting') = link_to t('devise.sessions.new.sign_in'), new_user_session_path(), :class => 'btn primary', :style => "float: right;" %footer diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 4204c6286..9c28769f4 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -894,6 +894,7 @@ en: password: "PASSWORD" password_confirmation: "PASSWORD CONFIRMATION" continue: "Continue" + submitting: "Submitting..." create: success: "You've joined Diaspora!" edit: From 6bd575d05c908997d474f75712c76ba0aaed462b Mon Sep 17 00:00:00 2001 From: Titouan Lorieul Date: Thu, 12 Sep 2013 08:28:47 +0200 Subject: [PATCH 2/2] Changelog updated --- Changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog.md b/Changelog.md index 672a0b6a6..966038fcb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,7 @@ * Adjust 404 message description to not leak logged out users if a post exists or not [#4477](https://github.com/diaspora/diaspora/pull/4477) * Make I18n system more robust against missing keys in pluralization data * Prevent overflow of too long strings in the single post view [#4487](https://github.com/diaspora/diaspora/pull/4487) +* Disable submit button in sign up form after submission to avoid email already exists error [#4506](https://github.com/diaspora/diaspora/issues/4506) ## Features * Add oEmbed content to the mobile view [#4343](https://github.com/diaspora/diaspora/pull/4353)