Commit 42b02240 authored by Andreas Valder's avatar Andreas Valder
Browse files

fixed multi line changes in changelog, closes #234

parent b7a512d2
......@@ -14,6 +14,7 @@ from socket import gethostname
from ipaddress import ip_address, ip_network
import math
import locale
import base64
locale.setlocale(locale.LC_ALL, 'de_DE.utf8')
......@@ -28,6 +29,7 @@ app.add_template_global(gethostname, name='gethostname')
app.add_template_global(min, name='min')
app.add_template_global(max, name='max')
scheduler = sched.scheduler()
def run_scheduler():
import time
......@@ -132,6 +134,10 @@ def evalperm(perms):
return cperms
return [{'type': 'public'}]
@app.template_filter()
def base64encode(str):
return base64.b64encode(str.encode('UTF-8')).decode('UTF-8')
@app.template_filter()
def checkperm(perms, username=None, password=None):
if ismod():
......
......@@ -47,7 +47,7 @@
<td style="white-space: nowrap;">{{i.path}}</td>
<td>"{{i.value_old}}"</td>
<td>"{{i.value_new}}"</td>
<td><button onclick="moderator.api.set('{{i.path}}','{{i.value_old}}');alert('done');" class="btn btn-default">undo</button></td>
<td><button onclick="moderator.api.set('{{i.path}}',atob('{{i.value_old|base64encode }}'));alert('done');" class="btn btn-default">undo</button></td>
</tr>
{% endfor %}
</table>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment