arrowcounter/counter/templates/counter/edit.html
2019-08-01 13:48:35 +02:00

50 lines
1.5 KiB
HTML

{# vim: set ts=2 sw=2 et tw=80: #}
{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% block title %}{% trans "Update count" %}{% endblock %}
{% block scripts %}
<script src="{% static "js/count_edit.js" %}"></script>
{% endblock %}
{% block content %}
<h1 class="center edit-arrowcount title">{% trans "Update count" %}</h1>
<form method="post" id="edit-arrowcount-form"
data-fetch-ajax="{% url "count_fetch_ajax" ac_id %}"
data-update-ajax="{% url "count_edit_ajax" ac_id %}">
<div class="col s12 card">
<div class="card-content">
{% csrf_token %}
<div class="row">
{{ form.as_p }}
</div>
<div class="row edit-arrowcount onebyone">
<button class="count-up green waves-effect btn-large"
type="button" data-increment="1">
+
</button>
<button class="count-down red waves-effect btn-large"
type="button">
-
</button>
</div>
<div class="row edit-arrowcount ends">
{% with '3 4 5 6 7 8 9 10' as list %}
{% for number in list.split %}
<button class="count-up btn waves-effect cyan"
type="button" data-increment="{{ number }}">
+ {{ number }}
</button>
{% endfor %}
{% endwith %}
</div>
</div>
<div class="card-action">
<a href="#"><button type="submit">{% trans "Save" %}</button></a>
</div>
</div>
</form>
{% endblock %}