Skip to content

Commit

Permalink
refactor(enrollment): define blocks for overriding index template
Browse files Browse the repository at this point in the history
  • Loading branch information
thekaveman committed Mar 22, 2024
1 parent 41f9526 commit cb493c3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% extends "core/includes/media-item.html" %}
{% load i18n %}

{% block icon %}
{% include "core/includes/icon.html" with name="bankcardcheck" %}
{% endblock icon %}

{% block heading %}
{% translate "The next step is to connect your contactless card to your transit benefit" %}
{% endblock heading %}

{% block body %}
<div class="media-body--details">
<p>
{% translate "You will be directed to our payment partner, " %}
{% include "core/includes/modal-trigger.html" with modal="modal--littlepay" text="Littlepay" period=True %}
{% translate "We don’t store your information, and you won’t be charged." %}
</p>
</div>

{% include "enrollment/includes/modal--littlepay.html" with id="modal--littlepay" size="modal-md" header="p-md-2 p-3" body="pb-md-3 mb-md-3 mx-md-3 py-0 pt-0 absolute-top" %}
{% endblock body %}
16 changes: 16 additions & 0 deletions benefits/enrollment/templates/enrollment/index--calfresh.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{% extends "enrollment/index.html" %}
{% load i18n %}

{% block media-items %}
<div class="col-12 col-sm-12 col-lg-8">
<ul class="media-list mx-0 px-0 d-flex justify-content-center flex-column">
{% include "enrollment/includes/media-item--bankcardcheck--index--calfresh.html" %}
</ul>
</div>
{% endblock media-items %}

{% block additional-info %}
<div class="col-12 col-sm-12 col-lg-8">
<p>Info alert here</p>
</div>
{% endblock additional-info %}
14 changes: 9 additions & 5 deletions benefits/enrollment/templates/enrollment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ <h1 class="pb-lg-8 pb-4">
{% endblock headline %}

{% block inner-content %}
<div class="col-12 col-sm-12 col-lg-8">
<ul class="media-list mx-0 px-0 d-flex justify-content-center flex-column">
{% include "enrollment/includes/media-item--bankcardcheck--index.html" %}
</ul>
</div>
{% block media-items %}
<div class="col-12 col-sm-12 col-lg-8">
<ul class="media-list mx-0 px-0 d-flex justify-content-center flex-column">
{% include "enrollment/includes/media-item--bankcardcheck--index.html" %}
</ul>
</div>
{% endblock media-items %}
{% block additional-info %}
{% endblock additional-info %}
{% comment %}
This Javascript code is partially generated by this template and so it must
come before the forms, which are rendered at just before the {% endblock inner-content %}
Expand Down

0 comments on commit cb493c3

Please sign in to comment.