{% extends "appointment/layout.html" %} {% load i18n %} {% load static %} {% block customCSS %} {% endblock %} {% block title %} {% trans 'Staff Appointment Information' %} {% endblock %} {% block description %} {% trans 'Staff Appointment Information' %} {% endblock %} {% block djappt_content %} {# Back to the profile being edited; adding a staff member goes back to the staff list #} {% with user_id=request.resolver_match.kwargs.user_id %} {% if user_id %} {% url 'appointment:user_profile' staff_user_id=user_id as back_url %} {% else %} {% url 'appointment:user_profile' as back_url %} {% endif %}
{% if messages %}
{% for message in messages %} {% endfor %}
{% endif %} {% trans 'Back' %} {# Whose settings these are; a new staff member has no user yet #}
{% if form.instance.user_id %} {% with name=form.instance.get_staff_member_name %}

{% trans 'Staff Appointment Information' %}

{{ name }}

{% endwith %} {% else %}

{% trans 'Staff Appointment Information' %}

{% trans 'Add staff member' %}

{% endif %}
{% csrf_token %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %} {% if form.user %}
{{ form.user }} {% for error in form.user.errors %}
{{ error }}
{% endfor %}

{% translate 'User not found' %} ? {% translate 'Create staff member manually' %}

{% endif %} {# One checkbox per service, in the service's colour; they post the same values as the multiple select did #}
{{ form.services_offered.label }}
    {% for choice in form.services_offered %}
  • {% empty %}
  • {% trans 'No service offered yet' %}.
  • {% endfor %}
{% for error in form.services_offered.errors %}
{{ error }}
{% endfor %}
{# The working day, the slots and the weekends: the label and its explanation, the field on the right #}

{% trans 'Schedule' %}

{% for field in form %} {% if field.name == 'lead_time' or field.name == 'finish_time' or field.name == 'slot_duration' or field.name == 'appointment_buffer_time' %}
{% if field.help_text %}
{{ field.help_text }}
{% endif %} {% for error in field.errors %}
{{ error }}
{% endfor %}
{% if field.name == 'slot_duration' or field.name == 'appointment_buffer_time' %}
{{ field }} {% trans 'min' context 'minutes, short' %}
{% else %} {{ field }} {% endif %}
{% endif %} {% endfor %} {% for field in form %} {% if field.name == 'work_on_saturday' or field.name == 'work_on_sunday' %}
{% for error in field.errors %}
{{ error }}
{% endfor %}
{{ field }}
{% endif %} {% endfor %}
{% trans 'Cancel' %}
{% endwith %} {% endblock %} {% block customJS %} {% endblock %}