Removed all inline <script> tags

This commit is contained in:
Raphael Michel
2016-04-10 16:44:49 +02:00
parent eafbe95370
commit 5cca426cd3
16 changed files with 157 additions and 87 deletions

View File

@@ -0,0 +1,7 @@
$(function () {
jQuery('#qrcodeCanvas').qrcode(
{
text: '{{ qrdata|safe }}'
}
);
});

View File

@@ -1,6 +1,7 @@
{% extends "pretixcontrol/event/base.html" %}
{% load i18n %}
{% load bootstrap3 %}
{% load staticfiles %}
{% block title %}{% trans "pretixdroid configuration" %}{% endblock %}
{% block content %}
<h1>{% trans "pretixdroid configuration" %}</h1>
@@ -9,11 +10,7 @@
If you try to configure the app, it will ask you to scan the QR code below.
{% endblocktrans %}</p>
<div id="qrcodeCanvas"></div>
<script type="text/javascript">
jQuery('#qrcodeCanvas').qrcode({
text: '{{ qrdata|safe }}'
});
</script>
<script type="text/javascript" src="{% static "pretixplugins/pretixdroid/pretixdroid.js" %}"></script>
<a href="?flush_key=1" class="btn btn-default">{% trans "Reset authentication token" %}</a>
{% endblock %}