From f6cdbbb83a3238a46f8a4bf89bcae599202a7a64 Mon Sep 17 00:00:00 2001 From: Jocelin Hounon Date: Fri, 2 Feb 2024 16:27:02 -0600 Subject: [PATCH] Remove extra whitespaces from TextAreaField form template (0.13.0 regression) (#494) * Fixed #493: Remove extra whitespaces from TextAreaField form template (0.13.0 regression) * update changelog --- docs/changelog/index.md | 3 +++ starlette_admin/templates/forms/textarea.html | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/changelog/index.md b/docs/changelog/index.md index 39d5fcaf..cc9864a5 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +* Remove extra whitespaces from TextAreaField form template (0.13.0 regression) by [@jowilf](https://github.com/jowilf) + in [#494](https://github.com/jowilf/starlette-admin/pull/494) + ## [0.13.1] - 2023-01-21 * Fixed the StopIteration exception raised in Sqlalchemy ModelView when the primary key is not included in the field diff --git a/starlette_admin/templates/forms/textarea.html b/starlette_admin/templates/forms/textarea.html index e966f1db..bbf2b454 100644 --- a/starlette_admin/templates/forms/textarea.html +++ b/starlette_admin/templates/forms/textarea.html @@ -1,7 +1,7 @@
- - {% if field.help_text %}{{ field.help_text }}{% endif %} + + {% if field.help_text -%} + {{ field.help_text }} + {% endif -%}
{% include "forms/_error.html" %}