{% extends "appointment/layout.html" %} {% load i18n %} {% load static %} {% block customCSS %} {% endblock %} {% block title %} {{ page_title }} {% endblock %} {% block description %} {% if service %}{{ page_title }}: {{ service.name }}{% else %}{{ page_title }}{% endif %} {% endblock %} {% block djappt_content %} {% translate "Confirm Deletion" as modal_title %} {% translate "Delete" as delete_btn_modal %} {% translate "Are you sure you want to delete this service?" as d_modal_message %}
{% if messages %}
{% for message in messages %} {% endfor %}
{% endif %}
{% trans 'Back to the services' %}
{% if btn_text %} {# Add or edit: the form, and a preview of the service's tile that follows the fields #}

{{ page_title }}

{% csrf_token %} {% if form.non_field_errors %}
{{ form.non_field_errors }}
{% endif %} {% for hidden in form.hidden_fields %}{{ hidden }}{% endfor %}
{% for field in form.visible_fields %}
{{ field }} {% if field.help_text %}
{{ field.help_text }}
{% endif %} {% for error in field.errors %}
{{ error }}
{% endfor %}
{% endfor %}
{% trans 'Cancel' %}
{% else %} {# Read-only view: the picture (or the colour) on the left, what staff need to know on the right #}
{# An image that fails to load falls back to the colour and the initial #} {% if service.get_image_url %} {{ service.name }} {% endif %}

{% trans 'Service' %}

{{ service.name }}

{% if request.user.is_superuser %}
{% trans 'Edit' %}
{% endif %}
{% if offered_by_me %}

{% trans 'You offer this service' %}

{% endif %} {% if service.description %}

{{ service.description|linebreaksbr }}

{% endif %}
{% trans 'Duration' %}
{{ service.get_duration }}
{% trans 'Price' %}
{{ service.get_price_text }}
{% if service.accepts_down_payment %}
{% trans 'Down Payment' %}
{{ service.get_down_payment_text }}
{% endif %}
{% trans 'Rescheduling' %}
{% if service.allow_rescheduling and service.reschedule_limit %} {% blocktrans count counter=service.reschedule_limit %}Up to {{ counter }} time{% plural %}Up to {{ counter }} times{% endblocktrans %} {% else %}{% trans 'Not allowed' %}{% endif %}
{% trans 'Calendar colour' %}
{{ form.initial.background_color|default:service.background_color }}

{% trans 'Offered by' %}

{% with staff_members=service.staffmember_set.all %} {% if staff_members %}
    {% for staff_member in staff_members %}
  • {{ staff_member.get_staff_member_name }}
  • {% endfor %}
{% else %}

{% trans 'No staff member offers this service yet.' %}

{% endif %} {% endwith %}
{% endif %} {% include 'modal/confirm_modal.html' %}
{% endblock %} {% block customJS %} {% if btn_text %} {% endif %} {% endblock %}