2012-07-10 22:18:48 +00:00
|
|
|
|
{% load markitup_tags %}
|
|
|
|
|
{% load i18n %}
|
|
|
|
|
|
|
|
|
|
{% if form %}
|
|
|
|
|
<div id="edit_{{ label }}" class="modal fade hide">
|
|
|
|
|
<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">×</button>
|
|
|
|
|
<h3>{% trans "Editing content:" %} {{ label }}</h3>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-body">
|
|
|
|
|
{% csrf_token %}
|
|
|
|
|
{{ form.content }}
|
|
|
|
|
|
|
|
|
|
{% markitup_editor form.content.auto_id %}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<div class="modal-footer">
|
2012-08-01 07:35:28 +00:00
|
|
|
|
<a href="#" class="btn" data-dismiss="modal">{% trans "Close" %}</a>
|
|
|
|
|
<button type="submit" class="btn btn-primary">{% trans "Save changes" %}</a>
|
2012-07-10 22:18:48 +00:00
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
<div id="content_{{ label }}" class="content-box {% if form %}editable{% endif %}">
|
|
|
|
|
{% if form %}
|
2012-08-01 07:35:28 +00:00
|
|
|
|
<a href="#edit_{{ label }}" data-toggle="modal" class="btn edit-toggle"><i class="icon-pencil"></i> {% trans "Edit this content" %}</a>
|
2012-07-10 22:18:48 +00:00
|
|
|
|
{% endif %}
|
|
|
|
|
{{ box.content|safe }}
|
|
|
|
|
</div>
|