Skip to content

Commit

Permalink
Add WTForm field descriptions in Edit/Create forms(#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaranko authored Mar 7, 2024
1 parent 653afdc commit d710365
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sqladmin/templates/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ <h3 class="card-title">New {{ model_view.name }}</h3>
{% for error in field.errors %}
<div class="invalid-feedback">{{ error }}</div>
{% endfor %}
{% if field.description %}
<small class="text-muted">{{ field.description }}</small>
{% endif %}
</div>
</div>
{% endfor %}
Expand Down
3 changes: 3 additions & 0 deletions sqladmin/templates/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ <h3 class="card-title">Edit {{ model_view.name }}</h3>
{% for error in field.errors %}
<div class="invalid-feedback">{{ error }}</div>
{% endfor %}
{% if field.description %}
<small class="text-muted">{{ field.description }}</small>
{% endif %}
</div>
</div>
{% endfor %}
Expand Down

0 comments on commit d710365

Please sign in to comment.