1 {% extends "base.html" %}
5 <h2>Nonstop — {{ zone.title }}</h2>
8 {% block more-user-links %}
10 <a href="{% url 'nonstop-quick-links' %}">Gestion nonstop</a>
16 {{form|with_template}}
19 <button class="submit-button">{% trans "Save" %}</button>
20 <a class="cancel" href="{% url 'nonstop-zones' %}">{% trans "Cancel" %}</a>
28 $('[type=range]').on('change', function() {
29 var params = $('[type=range]').serialize();
30 if (xhr !== null ) xhr.abort();
32 url: "{% url 'nonstop-ajax-zone-percents' slug=zone.slug %}?" + params,
34 success: function(data, status, xhr) {
35 for (var key of Object.keys(data)) {
36 $('#computed-percent-weight_' + key).text((parseInt(data[key] * 100)) + '%');
41 $('[type=range]').first().trigger('change');