welco/welco/kb/templates/kb/page_form.html

27 lines
605 B
HTML

{% extends "kb/base.html" %}
{% load i18n %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Page" %}</h2>
{% else %}
<h2>{% trans "New Page" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button>{% trans "Save" %}</button>
{% if object.id %}
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
{% else %}
<a class="cancel" href="{% url 'kb-home' %}">{% trans 'Cancel' %}</a>
{% endif %}
</div>
</form>
{% endblock %}