-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Is mostly universal, yet fields that require extra classes (like f.e. select2) need extra logic. Meaning that with few tweaks this template has a potential to fix all add/edit templates in /seeddb. Will finish and showcase this in a separate PR fixup
- Loading branch information
1 parent
008598a
commit 927bb84
Showing
2 changed files
with
27 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% for field in form %} | ||
<div id="div_id_{{ field.name }}" | ||
class="ctrlHolder {% if field.errors %}error{% endif %}" | ||
> | ||
<label for="id_{{ field.name }}" | ||
class="{% if field.field.required %}requiredField{% endif %}" | ||
> | ||
{{ field.label.title }} | ||
{% if field.field.required %}<span class="asteriskField">*</span>{% endif %} | ||
</label> | ||
{{ field }} | ||
{% for error in field.field.errors %} | ||
<small id="error_{{ forloop.counter }}_id_{{ field.name }}" class="error"> | ||
{{ error }} | ||
</small> | ||
{% endfor %} | ||
</div> | ||
{% endfor %} |
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