pattern_edit_form.html 1.13 KB
<form action="" method="post" id="pattern-edit-form">
  <p><input type="hidden" name="id" value="{{ id }}"/></p>
  <div id="pattern-properties">
    {{ type_form.as_p }}
    {{ form.as_p }}
    <p class="pattern-save">
      <button type="submit" disabled="disabled" id="pattern-edit-submit">
        Zapisz
      </button>
      <button type="reset" disabled="disabled" id="pattern-edit-cancel">
        Anuluj
      </button>
    </p>
  </div>
  <table id="ending-list" {{ editable|yesno:'class="editable",'|safe }}>
    {% for base_form_label, ending_group in ending_groups.iteritems %}
      <tr>
        <td><strong>{{ base_form_label.entry }}</strong></td>
        <td>
          <ul class="ending-group" id="bfl-{{ base_form_label.entry }}">
            {% for ending, form in ending_group %}
              {% include 'ending_row.html' %}
            {% endfor %}
          </ul>
        </td>
        <td>
          {% if editable %}
            <button type="button" class="add-ending">
              <span class="ui-icon ui-icon-plus"></span>
            </button>
          {% endif %}
        </td>
      </tr>
    {% endfor %}
  </table>
</form>