{% load i18n %}

<label>{% trans "Poll options" %}</label>
{{ poll_option_formset.management_form }}
{% for form in poll_option_formset.forms %}
<div class="poll-option-form row">
  {% for field in form.visible_fields %}
  <div class="col-md-6">
    {% if forloop.first %}
    {{ form.id }}
    {% endif %}
    {% if field.name == 'DELETE' %}
    <div class="checkbox">
      <label for="{{ field.auto_id }}">
        {{ field }}
        {{ field.label }}
      </label>
    </div>
    {% else %}
    {% include "partials/form_field.html" with field=field %}
    {% endif %}
  </div>
  {% endfor %}
</div>
{% endfor %}
<div class="py-3">
  <a href="#" id="add_more_poll_option" class="py-2 px-3 my-3 text-sm rounded border border-slate text-orange"><i class="icon-white icon-plus-sign"></i>&nbsp;{% trans "Add a poll option" %}</a>
</div>
{% if poll_option_formset.initial_form_count %}
<br /><br />
<div class="alert alert-warning">
  {% blocktrans %}<b>Note:</b>&nbsp;Deleting poll options of an existing poll will delete the associated votes.{% endblocktrans %}
</div>
{% endif %}
