2015-10-16 17:53:02 +00:00
|
|
|
{% 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>
|
2015-10-17 01:09:06 +00:00
|
|
|
<div class="modal-body form-group">
|
2015-10-16 17:53:02 +00:00
|
|
|
{% 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>
|