-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transform SSD help-text field into HTML editor field
- Loading branch information
Showing
6 changed files
with
87 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/open_inwoner/ssd/migrations/0006_alter_ssdconfig_mijn_uitkeringen_text.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Generated by Django 4.2.11 on 2024-06-24 14:07 | ||
|
||
from django.db import migrations | ||
|
||
import ckeditor.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("ssd", "0005_fix_translations_typo"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="ssdconfig", | ||
name="mijn_uitkeringen_text", | ||
field=ckeditor.fields.RichTextField( | ||
blank=True, | ||
help_text="The text displayed as overview of the 'Mijn Uitkeringen' section.", | ||
verbose_name="Overview text", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 37 additions & 50 deletions
87
src/open_inwoner/templates/pages/ssd/monthly_reports_list.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,41 @@ | ||
{% extends 'master.html' %} | ||
{% extends 'pages/ssd/reports_base.html' %} | ||
{% load i18n grid_tags dropdown_tags form_tags button_tags ssd_tags %} | ||
|
||
{% block content %} | ||
{% render_grid %} | ||
{% render_column span=9 %} | ||
<h1 class="utrecht-heading-1" id="title"> | ||
{% trans "Mijn uitkeringen" %} | ||
</h1> | ||
<p> | ||
{% blocktrans with mijn_uitkeringen_text=client.config.mijn_uitkeringen_text %} | ||
{{ mijn_uitkeringen_text }} | ||
{% endblocktrans %} | ||
</p> | ||
<div class="tab--container"> | ||
<div class="tabs"> | ||
<ul class="list tabs__headers"> | ||
<li class="list-item tab__header--item"><span id="monthly" class="link tab__header active">{% trans "Maandspecificaties" %}</span></li> | ||
<li class="list-item tab__header--item"><a href="{% url 'ssd:yearly_benefits_index' %}" id="yearly" class="link tab__header">{% trans "Jaaropgaven" %}</a></li> | ||
</ul> | ||
{% if client.config.maandspecificatie_enabled is True %} | ||
<div class="tabs__body"> | ||
{# Note: Mijn uitkeringen tab-content styles need to be independent from the URL, unlike the Tabs of the Login page #} | ||
{# URL-dependent styles would be coming from src/open_inwoner/js/components/tab-panels #} | ||
{# Setting class to 'tab__contents' instead of 'tab__content' is a quick-fix #} | ||
<div id="maandspecificaties" class="tab__contents active"> | ||
<p> | ||
{% blocktrans with display_text=client.config.maandspecificatie_display_text %} | ||
{{ display_text }} | ||
{% endblocktrans %} | ||
</p> | ||
{% render_form form=form method="POST" id="monthlyreports-form" show_required=False submit_text=_('Download') %} | ||
{% csrf_token %} | ||
{% input form.report_date icon="expand_more" icon_position="after" icon_outlined=True %} | ||
{% form_actions primary_text=_("Download") primary_icon="file_download" icon_position="before" extra_classes="ssd" %} | ||
{% endrender_form %} | ||
<div> | ||
{% if report_not_found %} | ||
{% blocktrans with time_period=report_not_found|date:"F Y" %} | ||
Geen uitkeringsspecificatie gevonden voor {{ time_period }}. | ||
{% endblocktrans %} | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% block report %} | ||
<div class="tab--container"> | ||
<div class="tabs"> | ||
<ul class="list tabs__headers"> | ||
<li class="list-item tab__header--item"><span id="monthly" class="link tab__header active">{% trans "Maandspecificaties" %}</span></li> | ||
<li class="list-item tab__header--item"><a href="{% url 'ssd:yearly_benefits_index' %}" id="yearly" class="link tab__header">{% trans "Jaaropgaven" %}</a></li> | ||
</ul> | ||
{% if client.config.maandspecificatie_enabled is True %} | ||
<div class="tabs__body"> | ||
{# Note: Mijn uitkeringen tab-content styles need to be independent from the URL, unlike the Tabs of the Login page #} | ||
{# URL-dependent styles would be coming from src/open_inwoner/js/components/tab-panels #} | ||
{# Setting class to 'tab__contents' instead of 'tab__content' is a quick-fix #} | ||
<div id="maandspecificaties" class="tab__contents active"> | ||
<p> | ||
{% blocktrans with display_text=client.config.maandspecificatie_display_text %} | ||
{{ display_text }} | ||
{% endblocktrans %} | ||
</p> | ||
{% render_form form=form method="POST" id="monthlyreports-form" show_required=False submit_text=_('Download') %} | ||
{% csrf_token %} | ||
{% input form.report_date icon="expand_more" icon_position="after" icon_outlined=True %} | ||
{% form_actions primary_text=_("Download") primary_icon="file_download" icon_position="before" extra_classes="ssd" %} | ||
{% endrender_form %} | ||
<div> | ||
{% if report_not_found %} | ||
{% blocktrans with time_period=report_not_found|date:"F Y" %} | ||
Geen uitkeringsspecificatie gevonden voor {{ time_period }}. | ||
{% endblocktrans %} | ||
{% endif %} | ||
</div> | ||
{% else %} | ||
<div>{% trans "Download of monthly reports not supported." %}</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{% endrender_column %} | ||
{% endrender_grid %} | ||
{% endblock content %} | ||
{% else %} | ||
<div>{% trans "Download of monthly reports not supported." %}</div> | ||
{% endif %} | ||
</div> | ||
</div> | ||
{% endblock report %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'master.html' %} | ||
{% load i18n grid_tags dropdown_tags form_tags button_tags ssd_tags %} | ||
|
||
{% block content %} | ||
{% render_grid %} | ||
{% render_column span=9 %} | ||
<h1 class="utrecht-heading-1" id="title"> | ||
{% trans "Mijn uitkeringen" %} | ||
</h1> | ||
<div class="wysiwyg"> | ||
{% blocktrans with mijn_uitkeringen_text=client.config.mijn_uitkeringen_text|safe %} | ||
{{ mijn_uitkeringen_text }} | ||
{% endblocktrans %} | ||
</div> | ||
|
||
{% block report %}{% endblock report %} | ||
|
||
{% endrender_column %} | ||
{% endrender_grid %} | ||
{% endblock content %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters