1. Sergiy shchypa
  2. cmsplugin-poll

Source

cmsplugin-poll / cmsplugin_poll / templates / cmsplugin_poll / create.html

{% load i18n poll_tags %}

<style>
  .cmsplugin_poll
  {
    padding: 5px;
    border: 1px solid grey;
    border-radius: 5px;
    background-color: white;
    position: relative;
  }

  .cmsplugin_poll .messages .error
  {
    color: red;
  }

  .cmsplugin_poll .info
  {
    font-size: 75%;
    color: grey;
  }

  .cmsplugin_poll ul
  {
    list-style-position: inside;
    padding-left: 0.5em;
  }
</style>

<div class="cmsplugin_poll">
  <form method="POST" action="">
  {% csrf_token %}
      <table>
      {{ poll.as_table }}
      {{ formset.as_table }}
<tr>
        <th></th>
        <td><input type="submit" name="submit" value="Submit" class="button"></td>
      </tr>
    </table>
  <!--
  {% for field in  poll %}
  {{field.error}}
    <label>{{field.label}}</label>:{{field}}<br/>
  {% endfor %}

{{ formset.non_form_errors.as_ul }}
<table id="formset" class="form">
{% for form in formset.forms %}
  {% if forloop.first %}
  <thead><tr>
    {% for field in form.visible_fields %}
    <th>{{ field.label|capfirst }}</th>
    {% endfor %}
  </tr></thead>
  {% endif %}
  <tr class="{% cycle row1,row2 %}">
  {% for field in form.visible_fields %}
    <td>
    {# Include the hidden fields in the form #}
    {% if forloop.first %}
      {% for hidden in form.hidden_fields %}
      {{ hidden }}
      {% endfor %}
    {% endif %}
      {{ field.errors.as_ul }}
      {{ field }}
    </td>
  {% endfor %}
  </tr>
{% endfor %}
</table>
<input type='submit' value="Sublmit"/>

-->
</form>
</div>