Skip to content

Commit

Permalink
update login markup
Browse files Browse the repository at this point in the history
STTNHUB-354
  • Loading branch information
petrjasek committed Sep 5, 2024
1 parent a83ae3d commit af45461
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 31 deletions.
42 changes: 21 additions & 21 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@
BABEL_DEFAULT_TIMEZONE = "America/Toronto"

# saml auth
SAML_LABEL = env("SAML_LABEL", "SSO")
SAML_LABEL = env("SAML_LABEL", "Login with SSO")
SAML_COMPANY = env("SAML_COMPANY", "CP")
SAML_BASE_PATH = pathlib.Path(env("SAML_PATH", SERVER_PATH.joinpath("saml")))
SAML_PATH_MAP = {
Expand Down
40 changes: 31 additions & 9 deletions server/theme/login.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
{% extends "login_layout.html" %}

{% block login_footer %}
{% if get_locale() == "fr_CA" %}
<a href="https://www.thecanadianpress.com/comment-vous-aider/sinscrire-a-nouvellespro/?lang=fr" class="nh-button nh-button--secondary w-100 mb-4 mt-2">{{ gettext("Sign up") }}</a>
{% block login_title %}{% endblock %}

{% block login_logo %}
<div class="d-flex align-items-center justify-content-center">
{% if get_locale() == "en" %}
<img src="{{ theme_url('login-logo.svg') }}" style="width: 70%;" />
{% else %}
<a href="https://www.thecanadianpress.com/contact/pr-signup" class="nh-button nh-button--secondary w-100 mb-4 mt-2">{{ gettext("Sign up") }}</a>
<img src="{{ theme_url('login-logo-fr.svg') }}" style="width: 70%; padding-top: 10px;" />
{% endif %}
<p>
{{ gettext('Forgot your password?') }}
<a href="mailto:{{ config.SUPPORT_EMAIL_EN }}?subject={{ gettext('Please reset my password for NewsPro') }}">{{ gettext('Contact Us') }}</a>
</p>
<a class="nh-button nh-button--secondary mb-4 mt-2" href="{{ url_for("auth.token", token_type="reset_password") }}">{{ gettext('Reset password') }}</a>
</div>
{% endblock %}

{% block login_footer %}
<div class="mt-2 mb-3">
<div class="d-flex align-items-center">
<span class="d-flex gap-1 text-md">
<span>{{ gettext("Don't have an account?") }} </span>
{% if get_locale() == "fr_CA" %}
<a href="https://www.thecanadianpress.com/comment-vous-aider/sinscrire-a-nouvellespro/?lang=fr" class="link">{{ gettext("Sign up") }}</a>
{% else %}
<a href="https://www.thecanadianpress.com/contact/pr-signup" class="link">{{ gettext("Sign up") }}</a>
{% endif %}
</span>
</div>
</div>
{% endblock %}

{% block saml_info %}{% endblock %}

{% block reset_password %}
<span>{{ gettext('Forgot your password?') }}</span>
<a class="link" href="mailto:{{ config.SUPPORT_EMAIL_EN }}?subject={{ gettext('Please reset my password for NewsPro') }}">{{ gettext('Contact Us') }}</a>
{{ gettext('or') }}
<a class="link" href="{{ url_for('auth.token', token_type='reset_password') }}">{{ gettext('Reset password') }}</a>
{% endblock %}

0 comments on commit af45461

Please sign in to comment.