UX: Hide login button during externally authenticated account creation

UX: Hide login button during externally authenticated account creation

Also switch to use the new d-button loading property for the create account button

diff --git a/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs b/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs
index e3bee67..eb2c794 100644
--- a/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs
+++ b/app/assets/javascripts/discourse/app/templates/modal/create-account.hbs
@@ -146,13 +146,14 @@
           action=(action "createAccount")
           disabled=submitDisabled
           label="create_account.title"
+          isLoading=formSubmitted
         }}
 
-        {{#conditional-loading-spinner condition=formSubmitted size="small"}}
-          {{#d-button class="btn-large" id="login-link" action=(route-action "showLogin")}}
+        {{#unless hasAuthOptions}}
+          {{#d-button class="btn-large" id="login-link" action=(route-action "showLogin") disabled=formSubmitted}}
             {{i18n "log_in"}}
           {{/d-button}}
-        {{/conditional-loading-spinner}}
+        {{/unless}}
 
         <div class="disclaimer">{{html-safe disclaimerHtml}}</div>
       </div>

GitHub sha: 041d2829

1 Like