Skip to content

Commit

Permalink
Refactor HTML template for Invite Users page to display form field er…
Browse files Browse the repository at this point in the history
…rors
  • Loading branch information
atodorov committed Apr 27, 2024
1 parent 5e9cb95 commit f480519
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tcms_tenants/templates/tcms_tenants/invite_users.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
<form class="form-horizontal" action="{% url 'tcms_tenants:invite-users' %}" method="post">
{% csrf_token %}

{% for i in form.range %}
{% for field in form %}
<div class="form-group">
<label class="col-md-1 col-lg-1" for="email_{{ i }}">{% trans "Email" %}</label>
<div class="col-sm-4 col-md-4 col-lg-4">
<input type="text" id="email_{{ i }}" name="email_{{ i }}" class="form-control">
<label class="col-md-1 col-lg-1" for="{{ field.name }}">{% trans "Email" %}</label>
<div class="col-sm-4 col-md-4 col-lg-4" {% if field.errors %}has-error{% endif %}">
<input type="text" id="{{ field.name }}" name="{{ field.name }}" value="{{ field.value }}" class="form-control">

{{ field.errors }}
</div>
</div>
{% endfor %}
Expand Down

0 comments on commit f480519

Please sign in to comment.