Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Login.gov help modal #1524

Merged
merged 7 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions benefits/core/migrations/0002_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def load_data(app, *args, **kwargs):
name=os.environ.get("MST_OAUTH_VERIFIER_NAME", "OAuth claims via Login.gov (MST)"),
eligibility_type=mst_senior_type,
auth_provider=senior_auth_provider,
selection_label_template="core/includes/selection-label--senior.html",
selection_label_template="eligibility/includes/selection-label--senior.html",
start_template="eligibility/start__login_gov.html",
unverified_title=_("eligibility.pages.unverified.title"),
unverified_blurb=_("eligibility.pages.unverified.p[0]"),
Expand All @@ -161,7 +161,7 @@ def load_data(app, *args, **kwargs):
name=os.environ.get("MST_VETERAN_VERIFIER_NAME", "VA.gov - Veteran (MST)"),
eligibility_type=mst_veteran_type,
auth_provider=veteran_auth_provider,
selection_label_template="core/includes/selection-label--veteran.html",
selection_label_template="eligibility/includes/selection-label--veteran.html",
start_template="eligibility/start__veteran.html",
unverified_title=_("eligibility.pages.unverified.title"),
unverified_blurb=_("eligibility.pages.unverified.p[0]"),
Expand All @@ -178,7 +178,7 @@ def load_data(app, *args, **kwargs):
jwe_encryption_alg=os.environ.get("COURTESY_CARD_VERIFIER_JWE_ENCRYPTION_ALG", "RSA-OAEP"),
jws_signing_alg=os.environ.get("COURTESY_CARD_VERIFIER_JWS_SIGNING_ALG", "RS256"),
auth_provider=None,
selection_label_template="core/includes/selection-label--mst-courtesy-card.html",
selection_label_template="eligibility/includes/selection-label--mst-courtesy-card.html",
start_template="eligibility/start__mst_courtesy_card.html",
form_title=_("eligibility.pages.confirm.mst_cc.title"),
form_headline=_("eligibility.pages.confirm.mst_cc.headline"),
Expand All @@ -201,7 +201,7 @@ def load_data(app, *args, **kwargs):
name=os.environ.get("SACRT_OAUTH_VERIFIER_NAME", "OAuth claims via Login.gov (SacRT)"),
eligibility_type=sacrt_senior_type,
auth_provider=senior_auth_provider,
selection_label_template="core/includes/selection-label--senior.html",
selection_label_template="eligibility/includes/selection-label--senior.html",
start_template="eligibility/start__login_gov.html",
unverified_title=_("eligibility.pages.unverified.title"),
unverified_blurb=_("eligibility.pages.unverified.p[0]"),
Expand Down
thekaveman marked this conversation as resolved.
Outdated
Show resolved Hide resolved

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "core/includes/modal.html" %}
{% load i18n %}
{% load static %}

{% block modal-content %}
<h2 class="px-lg-3">
{% translate "eligibility.pages.index.senior.help.headline" %}
<img class="icon" width="197" height="26" src="{% static "img/login-gov-logo.svg" %}" alt="{% translate "core.logos.login_gov" context "image alt text" %}" />
</h2>
<h3 class="pt-4 pt-lg-3 px-lg-3">{% translate "eligibility.pages.index.senior.help.sub_headline[0]" %}</h3>
<p class="pt-1 pt-lg-3 px-lg-3">{% translate "eligibility.pages.index.senior.help.p[0]" %}</p>

<h3 class="pt-4 pt-lg-3 px-lg-3">{% translate "eligibility.pages.index.senior.help.sub_headline[1]" %}</h3>
<p class="pt-1 pt-lg-3 px-lg-3">{% translate "eligibility.pages.index.senior.help.p[1]" %}</p>

<p class="py-4 py-lg-3 px-lg-3">{% translate "eligibility.pages.index.senior.help.p[2]" %}</p>
{% endblock modal-content %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "core/includes/selection-label.html" %}
{% extends "eligibility/includes/selection-label.html" %}
{% load i18n %}

{% block label %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{% extends "eligibility/includes/selection-label.html" %}
{% load i18n %}

{% block label %}
{% translate "eligibility.pages.index.senior.label" %}
{% endblock label %}

{% block description %}
{% translate "eligibility.pages.index.senior.description" %}

<!-- Button to trigger modal -->
<button id="login" type="button" class="modal-trigger--link" data-bs-toggle="modal" data-bs-target="#login-gov-help">
<span class="fallback-text color-logo">Login.gov</span>
</button>

{% include "eligibility/includes/modal--senior-help.html" with id="login-gov-help" %}
{% endblock description %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% extends "core/includes/selection-label.html" %}
{% extends "eligibility/includes/selection-label.html" %}
{% load i18n %}

{% block label %}
Expand Down
4 changes: 4 additions & 0 deletions benefits/eligibility/templates/eligibility/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{% extends "core/base.html" %}

{% block classes %}
{{ block.super | add:" eligibility-index" }}
{% endblock classes %}

{% block nav-buttons %}
{% include "core/includes/previous-page-link.html" %}
{% endblock nav-buttons %}
Expand Down
35 changes: 34 additions & 1 deletion benefits/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n"
"POT-Creation-Date: 2023-07-11 16:05+0000\n"
"POT-Creation-Date: 2023-07-12 05:34+0000\n"
"Language: English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -468,6 +468,39 @@ msgstr ""
"If you do not have an account with any of these services, you will need to "
"create one. We recommend using Login.gov."

msgid "eligibility.pages.index.senior.help.headline"
msgstr "Learn more about"

msgctxt "image alt text"
msgid "core.logos.login_gov"
msgstr "TODO"

msgid "eligibility.pages.index.senior.help.sub_headline[0]"
msgstr "What is Login.gov?"

msgid "eligibility.pages.index.senior.help.p[0]"
msgstr ""
"Login.gov is a service that offers secure and private online access to "
"government programs, such as federal benefits, services and applications. "
"With a Login.gov account, you can sign into multiple government websites "
"with the same email address and password."

msgid "eligibility.pages.index.senior.help.sub_headline[1]"
msgstr "Why is Cal-ITP Benefits using Login.gov?"

msgid "eligibility.pages.index.senior.help.p[1]"
msgstr ""
"Login.gov uses two-factor authentication, and stronger passwords, that meet "
"new National Institute of Standards of Technology requirements for secure "
"validation and verification. By using Login.gov, you’ll get an extra layer "
"of security to help protect your account against password compromises."

msgid "eligibility.pages.index.senior.help.p[2]"
msgstr ""
"For more information on Login.gov, please visit the <a href='https://login."
"gov/help/' target=\"_blank\" rel=\"noopener noreferrer\">Login.gov Help "
"Center</a>"

msgid "eligibility.pages.start.sub_headline"
msgstr "You will need a few items to connect your benefit:"

Expand Down
35 changes: 34 additions & 1 deletion benefits/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n"
"POT-Creation-Date: 2023-07-11 16:05+0000\n"
"POT-Creation-Date: 2023-07-12 05:34+0000\n"
"Language: Español\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -478,6 +478,39 @@ msgstr ""
"TODO: If you do not have an account with any of these services, you will "
"need to create one. We recommend using Login.gov."

msgid "eligibility.pages.index.senior.help.headline"
msgstr "TODO: Learn more about"

msgctxt "image alt text"
msgid "core.logos.login_gov"
msgstr "TODO"

msgid "eligibility.pages.index.senior.help.sub_headline[0]"
msgstr "TODO: What is Login.gov?"

msgid "eligibility.pages.index.senior.help.p[0]"
msgstr ""
"TODO: Login.gov is a service that offers secure and private online access to "
"government programs, such as federal benefits, services and applications. "
"With a Login.gov account, you can sign into multiple government websites "
"with the same email address and password."

msgid "eligibility.pages.index.senior.help.sub_headline[1]"
msgstr "TODO: Why is Cal-ITP Benefits using Login.gov?"

msgid "eligibility.pages.index.senior.help.p[1]"
msgstr ""
"TODO: Login.gov uses two-factor authentication, and stronger passwords, that "
"meet new National Institute of Standards of Technology requirements for "
"secure validation and verification. By using Login.gov, you’ll get an extra "
"layer of security to help protect your account against password compromises."

msgid "eligibility.pages.index.senior.help.p[2]"
msgstr ""
"TODO: For more information on Login.gov, please visit the <a href='https://"
"login.gov/help/' target=\"_blank\" rel=\"noopener noreferrer\">Login.gov "
"Help Center</a>"

msgid "eligibility.pages.start.sub_headline"
msgstr "Necesitará algunos artículos para conectar su beneficio:"

Expand Down
9 changes: 8 additions & 1 deletion benefits/static/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,13 @@ footer .footer-links li a:visited {
letter-spacing: 0;
font-size: var(--login-gov-button-font-size);
font-family: "Public Sans", Roboto, system-ui;
padding: var(--login-gov-button-padding);
text-decoration: none;
}

.eligibility-start #login {
padding: var(--login-gov-button-padding);
}

/* Sets the text `Login.gov` as transparent */
/* With an Login.gov logo image over it */
/* So screenreaders can read out `Login.gov` */
Expand All @@ -371,6 +374,10 @@ footer .footer-links li a:visited {
line-height: 1;
}
thekaveman marked this conversation as resolved.
Show resolved Hide resolved

.eligibility-index #login .fallback-text {
display: inline-block;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is so the ? icon stays on the same line as the Login.gov image in mobile.

Maybe look at refactoring this rule in the future (to not be inside a media query): https://github.com/cal-itp/benefits/blob/dev/benefits/static/css/styles.css#L385

}

#login .fallback-text.white-logo {
background-image: url("/static/img/login-gov-logo-rev.svg");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/pytest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def model_EligibilityVerifier(model_PemData, model_EligibilityType):
api_auth_key="secret-key",
eligibility_type=model_EligibilityType,
public_key=model_PemData,
selection_label_template="core/includes/selection-label.html",
selection_label_template="eligibility/includes/selection-label.html",
form_title="Form",
form_headline="Form",
form_blurb="Form Blurb",
Expand Down