This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
authentic2-pratic/src/authentic2_pratic/templates/authentic2_pratic/form.html

45 lines
1.3 KiB
HTML

{% extends "authentic2_pratic/sidebar.html" %}
{% load i18n %}
{% block messages %}
{% endblock %}
{% block main %}
<div class="content">
{% if title %}
<div id="appbar"><h2>{{ title }}</h2></div>
{% endif %}
{% if other_actions %}
<div class="other_actions">
<strong>{% trans "Actions" %}</strong>
<form method="post">
{% for action in other_actions %}
<input type="submit" name="{{ action.name }}" value="{{ action.title }}"
{% if action.confirm %}data-confirm="{{ action.confirm }}"{% endif %}
/>
{% endfor %}
</form>
</div>
{% endif %}
<form method="post">
<div class="form-inner-container">
{% if messages %}
<ul class="messages">
{% for message in messages %}
<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% if action %}{{ action }}{% else %}{% trans "Save" %}{% endif %}</button>
<a class="cancel" href="..">{% trans "Cancel" %}</a>
</div>
</div>
</form>
</div>
{% endblock %}