FIX: show sign up modal when local logins are disabled (#12611)

This commit is contained in:
Kris 2021-04-06 10:31:51 -04:00 committed by GitHub
parent 98ae4e2829
commit 1ebb40a713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 41 additions and 29 deletions

View File

@ -97,6 +97,9 @@ export default Controller.extend(
if (hasAtLeastOneLoginButton && !hasAuthOptions) {
classes.push("has-alt-auth");
}
if (!this.canCreateLocal) {
classes.push("no-local-logins");
}
return classes.join(" ");
},

View File

@ -7,17 +7,18 @@
{{loading-spinner size="large"}}
{{/if}}
{{#if showCreateForm}}
<div class="create-account-form">
<div class="login-welcome-header">
<h1 class="login-title">{{i18n "create_account.header_title"}}</h1> <img src={{wavingHandURL}} alt="" class="waving-hand">
<p class="login-subheader">{{i18n "create_account.subheader_title"}}</p>
<div class="create-account-form">
<div class="login-welcome-header">
<h1 class="login-title">{{i18n "create_account.header_title"}}</h1> <img src={{wavingHandURL}} alt="" class="waving-hand">
<p class="login-subheader">{{i18n "create_account.subheader_title"}}</p>
</div>
{{#unless hasAuthOptions}}
<div class="create-account-login-buttons">
{{login-buttons externalLogin=(action "externalLogin")}}
</div>
{{#unless hasAuthOptions}}
<div class="create-account-login-buttons">
{{login-buttons externalLogin=(action "externalLogin")}}
</div>
{{/unless}}
{{/unless}}
{{#if showCreateForm}}
<div class="login-form">
<form>
@ -147,29 +148,29 @@
{{/if}}
</form>
</div>
{{#if showCreateForm}}
<div class="modal-footer">
{{d-button
class="btn-large btn-primary"
action=(action "createAccount")
disabled=submitDisabled
label="create_account.title"
isLoading=formSubmitted
}}
{{#unless hasAuthOptions}}
{{d-button class="btn-large" id="login-link" action=(route-action "showLogin") disabled=formSubmitted label="log_in"}}
{{/unless}}
<div class="modal-footer">
{{d-button
class="btn-large btn-primary"
action=(action "createAccount")
disabled=submitDisabled
label="create_account.title"
isLoading=formSubmitted
}}
<div class="disclaimer">
{{html-safe disclaimerHtml}}
</div>
{{#unless hasAuthOptions}}
{{d-button class="btn-large" id="login-link" action=(route-action "showLogin") disabled=formSubmitted label="log_in"}}
{{/unless}}
<div class="disclaimer">
{{html-safe disclaimerHtml}}
</div>
</div>
{{plugin-outlet name="create-account-after-modal-footer" tagName=""}}
{{/if}}
</div>
{{/if}}
{{plugin-outlet name="create-account-after-modal-footer" tagName=""}}
{{/if}}
</div>
{{/d-modal-body}}
{{/unless}}
{{/create-account}}

View File

@ -105,6 +105,14 @@
&.awaiting-approval {
display: none;
}
.no-local-logins {
// when third-party auth is available, but not local logins
.login-left-side,
.login-welcome-header {
padding: 3em 1em 3em 3em;
}
}
}
// Login Form Styles