{% extends 'base.html' %} {% load crispy_forms_tags static %} {% block content %}

Request leave{% if worker %} for {{ worker.name }}{% endif %}

Request leave on calendar

{% include 'rota/partials/flatpickr_includes.html' %}

Click a start date then a second date to select a range and prefill the leave form.

{% if token %}

Update your settings

{% endif %}
{% csrf_token %} {% if token %} {% endif %} {{ form|crispy }}
{% if worker %}

Existing leave for {{ worker.name }}

{% include 'rota/partials/leave_list.html' with leaves=worker.leaves.all %}
{% else %}

If you are requesting leave for a specific worker, open this page using the worker link so existing requests will be shown.

{% endif %}
Legend: Existing leave Selected range
{% endblock %}