parent
a2e2b8992b
commit
6fca90977f
@ -1,12 +1,21 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<form action=/edit method="post">
|
<form action=/edit id="editform" method="post">
|
||||||
<input type="hidden" name="code" value="{{code}}" />
|
<input type="hidden" name="code" value="{{code}}" />
|
||||||
QR-code:<br />
|
QR-code:<br />
|
||||||
<input type="text" value="{{code}}" disabled /><br />
|
<input type="text" value="{{code}}" disabled /><br />
|
||||||
URL:<br />
|
URL:<br />
|
||||||
<input type="url" name="url" value=""/><br />
|
<input type="url" id="url" name="url" value="{{url}}"/><br />
|
||||||
<button type="submit" class="graybar" >Save </button>
|
<button type="submit" class="graybar" >Save</button>
|
||||||
</form>
|
</form>
|
||||||
|
{% if admin == True %}
|
||||||
|
<button class="graybar" onclick="removeLink()">Remove link</button>
|
||||||
|
{% endif %}
|
||||||
|
<script>
|
||||||
|
function removeLink() {
|
||||||
|
document.getElementById("url").value = "";
|
||||||
|
document.getElementById("editform").submit();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Loading…
Reference in new issue