Merge pull request #15715 from edx/saleem-latif/ENT-555

ENT-555: Continue button is not appearing on registration page.
This commit is contained in:
Brittney Exline
2017-08-03 11:05:34 -04:00
committed by GitHub
4 changed files with 10 additions and 2 deletions

View File

@@ -591,6 +591,7 @@ class StudentAccountLoginAndRegistrationTest(ThirdPartyAuthTestMixin, UrlResetMi
"secondaryProviders": [],
"finishAuthUrl": finish_auth_url,
"errorMessage": None,
"registerFormSubmitButtonText": "Create Account",
}
if expected_ec is not None:
# If we set an EnterpriseCustomer, third-party auth providers ought to be hidden.

View File

@@ -316,6 +316,7 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None):
"secondaryProviders": [],
"finishAuthUrl": None,
"errorMessage": None,
"registerFormSubmitButtonText": _("Create Account"),
}
if third_party_auth.is_enabled():
@@ -361,6 +362,7 @@ def _third_party_auth_context(request, redirect_to, tpa_hint=None):
).format(
configuration_helpers.get_value('PLATFORM_NAME', settings.PLATFORM_NAME)
)
context["registerFormSubmitButtonText"] = _("Continue")
# Check for any error messages we may want to display:
for msg in messages.get_messages(request):

View File

@@ -58,6 +58,8 @@
this.autoSubmit = data.thirdPartyAuth.autoSubmitRegForm;
this.hideAuthWarnings = data.hideAuthWarnings;
this.autoRegisterWelcomeMessage = data.thirdPartyAuth.autoRegisterWelcomeMessage || '';
this.registerFormSubmitButtonText =
data.thirdPartyAuth.registerFormSubmitButtonText || _('Create Account');
this.listenTo(this.model, 'sync', this.saveSuccess);
this.listenTo(this.model, 'validation', this.renderLiveValidations);
@@ -77,7 +79,8 @@
providers: this.providers,
hasSecondaryProviders: this.hasSecondaryProviders,
platformName: this.platformName,
autoRegisterWelcomeMessage: this.autoRegisterWelcomeMessage
autoRegisterWelcomeMessage: this.autoRegisterWelcomeMessage,
registerFormSubmitButtonText: this.registerFormSubmitButtonText
}
}));

View File

@@ -51,5 +51,7 @@
<%= context.fields %>
<button type="submit" class="action action-primary action-update js-register register-button"><%- gettext("Create account") %></button>
<button type="submit" class="action action-primary action-update js-register register-button">
<% if ( context.registerFormSubmitButtonText ) { %><%- context.registerFormSubmitButtonText %><% } else { %><%- gettext("Create Account") %><% } %>
</button>
</form>