aboutsummaryrefslogtreecommitdiff
path: root/gn2/wqflask/templates/docedit.html
diff options
context:
space:
mode:
Diffstat (limited to 'gn2/wqflask/templates/docedit.html')
-rw-r--r--gn2/wqflask/templates/docedit.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/gn2/wqflask/templates/docedit.html b/gn2/wqflask/templates/docedit.html
new file mode 100644
index 00000000..50bb96c0
--- /dev/null
+++ b/gn2/wqflask/templates/docedit.html
@@ -0,0 +1,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 %}