aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/docedit.html
blob: 50bb96c091e87155d87b1a2ada1fb33157f80590 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{% extends "base.html" %}

{% block title %}Edit: {{title}}{% endblock %}

{% block content %}
<div class="container">
    <h3>Edit: {{title}}</h3>
    <form id="update_text" action="/update_text" method="post">
        <input type="hidden" name="entry_type" value="{{ entry }}">
        <input type="hidden" name="title" value="{{ title }}">
        {% if editable is defined %}
        <input type="hidden" name="edit" value="{{ editable }}">
        {% endif %}
        <button class="submit_changes" style="margin-bottom: 20px;">Submit Changes</button>
        <textarea name="ckcontent" id="ckcontent">
			{{content|safe}}
        </textarea>
        <button class="submit_changes" style="margin-top: 20px;">Submit Changes</button>
        <script language="javascript" type="text/javascript" src="{{ url_for('js', filename='ckeditor/ckeditor.js') }}"></script>
        <script type="text/javascript">
            CKEDITOR.replace('ckcontent',	{
                height: '650px',
            });

            $('.submit_changes').click(function() {
                $('#update_text').submit();
            })
        </script>
    </form>
</div>
{% endblock %}