Skip to content

Commit

Permalink
Remove extra whitespaces from TextAreaField form template (0.13.0 reg…
Browse files Browse the repository at this point in the history
…ression) (#494)

* Fixed #493: Remove extra whitespaces from TextAreaField form template (0.13.0 regression)

* update changelog
  • Loading branch information
jowilf authored Feb 2, 2024
1 parent 9fa17da commit f6cdbbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions docs/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions starlette_admin/templates/forms/textarea.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="{% if error %}{{ field.error_class }}{% endif %}">
<textarea id="{{ field.id }}" name="{{ field.id }}" data-bs-toggle="autosize" class="{{ field.class_ }}
{% if error %}{{ field.error_class }}{% endif %}" {{ field.input_params() | safe }}>{% if data %}
{{ data }}{% endif %}</textarea>
{% if field.help_text %}<small class="form-hint">{{ field.help_text }}</small>{% endif %}
<textarea id="{{ field.id }}" name="{{ field.id }}" data-bs-toggle="autosize" class="{{ field.class_ }}{% if error %} {{ field.error_class }}{% endif %}" {{ field.input_params() | safe }}>{% if data -%}{{ data }}{% endif %}</textarea>
{% if field.help_text -%}
<small class="form-hint">{{ field.help_text }}</small>
{% endif -%}
</div>
{% include "forms/_error.html" %}

0 comments on commit f6cdbbb

Please sign in to comment.