acl_form.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. {% extends "admin/admin/layout.html" %}
  2. {% import "forms.html" as form_theme with context %}
  3. {% block action_body %}
  4. <form action="{{ link }}" method="post">
  5. {{ form_theme.hidden_fields(form) }}
  6. {% for fieldset in form.iterator() %}
  7. <table class="table table-striped">
  8. <thead>
  9. <tr>
  10. <th class="lead">{{ fieldset.name }}</th>
  11. <th>{% trans %}Permission{% endtrans %}</th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. {% for field in fieldset %}
  16. <tr>
  17. <td>
  18. <strong>{{ field.label }}</strong>{% if field.help_text %}<div class="muted">{{ field.help_text }}</div>{% endif %}
  19. </td>
  20. <td class="span8">
  21. {{ form_theme.field(field, attrs={'class': 'span6'}) }}
  22. </td>
  23. </tr>
  24. {% endfor %}
  25. </tbody>
  26. </table>
  27. {% endfor %}
  28. <div class="form-actions">
  29. {% block form_actions %}
  30. {% block form_submit %}
  31. <button name="save" type="submit" class="btn btn-primary">{{ action.submit_button }}</button>
  32. {% endblock %}
  33. {% if action.get_edit_link -%}
  34. <button name="save_edit" type="submit" class="btn btn-warning">{% trans %}Save and Edit{% endtrans %}</button>
  35. {%- endif %}
  36. {% if action.get_new_link -%}
  37. <button name="save_new" type="submit" class="btn btn-success">{% trans %}Save and Add Another{% endtrans %}</button>
  38. {%- endif %}
  39. {% if fallback %}<a href="{{ fallback }}" class="btn">{% trans %}Cancel{% endtrans %}</a>{% endif %}
  40. {% endblock %}
  41. </div>
  42. </form>
  43. {% endblock %}