chrono/chrono/manager/templates/chrono/manager_confirm_booking_can...

40 lines
1.6 KiB
HTML

{% extends "chrono/manager_home.html" %}
{% load i18n %}
{% block appbar %}
<h2>{% trans "Cancel booking" %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% if object.get_backoffice_url and not object.cancel_callback_url %}
{% if not user.is_staff %}
<p>{% trans "This booking has no callback url configured, cancellation must be handled from corresponding form." %}</p>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
{% else %}
<div class="warningnotice">
<p>{% trans "This booking has no callback url configured, cancellation should be handled from corresponding form in order to garantee a coherent situation." %}</p>
</div>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
<p>{% trans "However, since you are an administrator, you can choose to cancel it anyway." %}</p>
{% endif %}
{% else %}
<p>
{% blocktrans trimmed with booking=booking.events_display %}
Are you sure you want to cancel booking "{{ booking }}"?
{% endblocktrans %}
</p>
{% endif %}
{% if not object.get_backoffice_url or object.cancel_callback_url or user.is_staff %}
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form.as_p }}
<div class="buttons">
<button class="delete-button">{% trans "Proceed with cancellation" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
</div>
{% endif %}
</form>
{% endblock %}