blob: 3db02828d7cb9edb0a9de966a20eb57c9ff4ce0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{% extends 'planner/base.html' %}
{%block extrahead%}<link href="/media/mc-calendar.min.css" rel="stylesheet" />{%endblock%}
{% load typogrify_tags %}
{% block pagetitle %}Luxagraf - Add Camp{% endblock %}
{% block content %}
<form id="id_form" action="{% url 'luxplanner:create' %}" method="post" class="big">{% csrf_token %}
{% for field in form %}
<fieldset>
{{ field.errors }}
{% if field.name == 'status'%}
<label class="hide" for="id_status">Status:</label>{{ field }}
{% else %}
{{ field.label_tag }} {{ field }}
{% endif %}
{% if field.help_text %}
<p class="help">{{ field.help_text|safe }}</p>
{% endif %}
</fieldset>
{% endfor %}
<div class="flex">
<input type="submit" name="post" class="btn" value="add camp"/>
</div>
</form>
{% endblock %}
{% block js %}
<script src="/media/js/mc-calendar.min.js"></script>
<script>
arrive = MCDatepicker.create({
el: '#id_date_arrive',
dateFormat: 'YYYY-MM-DD'
});
depart = MCDatepicker.create({
el: '#id_date_depart',
dateFormat: 'YYYY-MM-DD',
});
arrive.onClose(() => depart.setYear(arrive.getYear()));
arrive.onClose(() => depart.setMonth(arrive.getMonth()));
arrive.onClose(() => depart.setDate(arrive.getDate()));
</script>
{% endblock %}
|