From 77b59db56fd7a4017b117a4ba990d4dbee7100cd Mon Sep 17 00:00:00 2001 From: mpeltriaux Date: Wed, 2 Feb 2022 12:54:45 +0100 Subject: [PATCH] # 86 Comment field length * removes comment field length limit * adds improvements for rendering large comments --- compensation/forms/modalForms.py | 3 +-- .../detail/compensation/includes/actions.html | 9 +++++++-- .../detail/compensation/includes/deadlines.html | 6 +++++- .../detail/compensation/includes/documents.html | 8 ++++++-- .../detail/eco_account/includes/actions.html | 10 +++++++--- .../detail/eco_account/includes/deadlines.html | 8 ++++++-- .../detail/eco_account/includes/documents.html | 8 ++++++-- ema/templates/ema/detail/includes/actions.html | 8 ++++++-- ema/templates/ema/detail/includes/deadlines.html | 8 ++++++-- ema/templates/ema/detail/includes/documents.html | 8 ++++++-- .../intervention/detail/includes/documents.html | 8 ++++++-- .../intervention/detail/includes/payments.html | 8 ++++++-- .../intervention/detail/includes/revocation.html | 8 ++++++-- konova/templatetags/ksp_filters.py | 16 ++++++++++++++++ templates/base.html | 2 +- 15 files changed, 91 insertions(+), 27 deletions(-) diff --git a/compensation/forms/modalForms.py b/compensation/forms/modalForms.py index dd9f4c70..9e7419b6 100644 --- a/compensation/forms/modalForms.py +++ b/compensation/forms/modalForms.py @@ -346,10 +346,9 @@ class NewActionModalForm(BaseModalForm): ) comment = forms.CharField( required=False, - max_length=200, label=_("Comment"), label_suffix=_(""), - help_text=_("Additional comment, maximum {} letters").format(200), + help_text=_("Additional comment"), widget=forms.Textarea( attrs={ "rows": 5, diff --git a/compensation/templates/compensation/detail/compensation/includes/actions.html b/compensation/templates/compensation/detail/compensation/includes/actions.html index 648e777a..129673ef 100644 --- a/compensation/templates/compensation/detail/compensation/includes/actions.html +++ b/compensation/templates/compensation/detail/compensation/includes/actions.html @@ -1,4 +1,5 @@ -{% load i18n l10n fontawesome_5 humanize %} +{% load i18n l10n fontawesome_5 humanize ksp_filters %} +
@@ -55,7 +56,11 @@ {% endfor %} {{ action.amount|floatformat:2|intcomma }} {{ action.unit_humanize }} - {{ action.comment|default_if_none:"" }} + +
+ {{ action.comment }} +
+ {% if is_default_member and has_access %}