diff --git a/static/js/portico/signup.js b/static/js/portico/signup.js index 9a85d26892..e88fcc2256 100644 --- a/static/js/portico/signup.js +++ b/static/js/portico/signup.js @@ -103,6 +103,14 @@ $(() => { $("#timezone").val(new Intl.DateTimeFormat().resolvedOptions().timeZone); } + $("#registration").on("submit", () => { + if ($("#registration").valid()) { + $(".register-button .loader").css("display", "inline-block"); + $(".register-button").prop("disabled", true); + $(".register-button span").hide(); + } + }); + // Code in this block will be executed when the /accounts/send_confirm // endpoint is visited i.e. accounts_send_confirm.html is rendered. if ($("[data-page-id='accounts-send-confirm']").length > 0) { diff --git a/static/styles/portico/portico_signin.css b/static/styles/portico/portico_signin.css index a5d0ba114b..c0b8ab2e75 100644 --- a/static/styles/portico/portico_signin.css +++ b/static/styles/portico/portico_signin.css @@ -804,6 +804,15 @@ button#register_auth_button_gitlab { border-radius: 4px; } + .register-button .loader { + display: none; + vertical-align: top; + position: relative; + height: 30px; + margin-top: -10px; + top: 5px; + } + #id_team_subdomain.subdomain { margin-top: 0; text-align: right; diff --git a/templates/zerver/register.html b/templates/zerver/register.html index 44dc0470c2..bcb3b6ad04 100644 --- a/templates/zerver/register.html +++ b/templates/zerver/register.html @@ -236,7 +236,10 @@ Form is validated both client-side using jquery-validate (see signup.js) and ser {% endif %}