From 7908d97ca0668cbc0a320afe96eb2596e15bc2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laur=C3=A9line=20Gu=C3=A9rin?= Date: Thu, 7 Nov 2019 11:10:02 +0100 Subject: [PATCH] time exceptions: add some details to the delete confirmation popup (#37419) --- .../templates/chrono/manager_confirm_delete.html | 4 ++-- tests/test_manager.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/chrono/manager/templates/chrono/manager_confirm_delete.html b/chrono/manager/templates/chrono/manager_confirm_delete.html index e17c829f..469da722 100644 --- a/chrono/manager/templates/chrono/manager_confirm_delete.html +++ b/chrono/manager/templates/chrono/manager_confirm_delete.html @@ -2,7 +2,7 @@ {% load i18n %} {% block appbar %} -

{{ view.model.get_verbose_name }}

+

{{ object }}

{% endblock %} {% block content %} @@ -13,7 +13,7 @@ {% blocktrans %}This cannot be removed as there are bookings for a future date. {% endblocktrans %} {% else %} - {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %} + {% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %} {% endif %}

diff --git a/tests/test_manager.py b/tests/test_manager.py index 9f04ea6b..8f1dfb74 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -250,7 +250,7 @@ def test_delete_busy_agenda(app, admin_user): resp = app.get('/manage/', status=200) resp = resp.click('Foo bar').follow() resp = resp.click('Delete') - assert 'Are you sure you want to delete this?' in resp.text + assert 'Are you sure you want to delete this exception?' in resp.text booking = Booking(event=event) booking.save() @@ -264,7 +264,7 @@ def test_delete_busy_agenda(app, admin_user): resp = app.get('/manage/', status=200) resp = resp.click('Foo bar').follow() resp = resp.click('Delete') - assert 'Are you sure you want to delete this?' in resp.text + assert 'Are you sure you want to delete this exception?' in resp.text # suddenly the booking is no longer cancelled, but the admin clicks on the # delete button. @@ -300,7 +300,7 @@ def test_delete_busy_desk(app, admin_user): resp = resp.click('Settings') desk_page = resp.click('Desk A') desk_delete_page = desk_page.click('Delete') - assert 'Are you sure you want to delete this?' in desk_delete_page.text + assert 'Are you sure you want to delete this exception?' in desk_delete_page.text # make sure the deleting is not disabled assert 'disabled' not in desk_delete_page.text @@ -488,7 +488,7 @@ def test_delete_busy_event(app, admin_user): resp = app.get('/manage/agendas/%s/settings' % agenda.id, status=200) resp = resp.click(href=r'/manage/events/%s/$' % event.id) resp = resp.click('Delete') - assert 'Are you sure you want to delete this?' in resp.text + assert 'Are you sure you want to delete this exception?' in resp.text booking = Booking(event=event) booking.save() @@ -502,7 +502,7 @@ def test_delete_busy_event(app, admin_user): resp = app.get('/manage/agendas/%s/settings' % agenda.id, status=200) resp = resp.click(href=r'/manage/events/%s/$' % event.id) resp = resp.click('Delete') - assert 'Are you sure you want to delete this?' in resp.text + assert 'Are you sure you want to delete this exception?' in resp.text # suddenly the booking is no longer cancelled, but the admin clicks on the # delete button.