33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
{% load i18n %}
|
|
|
|
{% if form %}
|
|
<div id="edit_{{ label }}" class="modal fade">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<form id="edit_form_{{ label }}" accept-charset="UTF-8" class="modal-form" method="POST" action="{{ form_action }}?next={{ request.path }}">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
<h4 class="modal-title">{% trans "Editing content:" %} {{ label }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
{% csrf_token %}
|
|
{{ form.content }}
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary">Save changes</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div id="content_{{ label }}" class="content-box {% if form %}editable{% endif %}">
|
|
{% if form %}
|
|
<a href="#edit_{{ label }}" data-toggle="modal" class="btn btn-default btn-sm edit-toggle">
|
|
<i class="fa fa-pencil"></i>
|
|
Edit this content
|
|
</a>
|
|
{% endif %}
|
|
{{ box.content_html|safe }}
|
|
</div>
|