Projet

Général

Profil

0001-time-exceptions-add-some-details-to-the-delete-confi.patch

Lauréline Guérin, 19 novembre 2019 15:01

Télécharger (3,53 ko)

Voir les différences:

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(-)
chrono/manager/templates/chrono/manager_confirm_delete.html
2 2
{% load i18n %}
3 3

  
4 4
{% block appbar %}
5
<h2>{{ view.model.get_verbose_name }}</h2>
5
<h2>{{ object }}</h2>
6 6
{% endblock %}
7 7

  
8 8
{% block content %}
......
13 13
  {% blocktrans %}This cannot be removed as there are bookings for a future date.
14 14
  {% endblocktrans %}
15 15
  {% else %}
16
  {% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
16
  {% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %}
17 17
  {% endif %}
18 18
  </p>
19 19
  <div class="buttons">
tests/test_manager.py
250 250
    resp = app.get('/manage/', status=200)
251 251
    resp = resp.click('Foo bar').follow()
252 252
    resp = resp.click('Delete')
253
    assert 'Are you sure you want to delete this?' in resp.text
253
    assert 'Are you sure you want to delete this exception?' in resp.text
254 254

  
255 255
    booking = Booking(event=event)
256 256
    booking.save()
......
264 264
    resp = app.get('/manage/', status=200)
265 265
    resp = resp.click('Foo bar').follow()
266 266
    resp = resp.click('Delete')
267
    assert 'Are you sure you want to delete this?' in resp.text
267
    assert 'Are you sure you want to delete this exception?' in resp.text
268 268

  
269 269
    # suddenly the booking is no longer cancelled, but the admin clicks on the
270 270
    # delete button.
......
300 300
    resp = resp.click('Settings')
301 301
    desk_page = resp.click('Desk A')
302 302
    desk_delete_page = desk_page.click('Delete')
303
    assert 'Are you sure you want to delete this?' in desk_delete_page.text
303
    assert 'Are you sure you want to delete this exception?' in desk_delete_page.text
304 304
    # make sure the deleting is not disabled
305 305
    assert 'disabled' not in desk_delete_page.text
306 306

  
......
488 488
    resp = app.get('/manage/agendas/%s/settings' % agenda.id, status=200)
489 489
    resp = resp.click(href=r'/manage/events/%s/$' % event.id)
490 490
    resp = resp.click('Delete')
491
    assert 'Are you sure you want to delete this?' in resp.text
491
    assert 'Are you sure you want to delete this exception?' in resp.text
492 492

  
493 493
    booking = Booking(event=event)
494 494
    booking.save()
......
502 502
    resp = app.get('/manage/agendas/%s/settings' % agenda.id, status=200)
503 503
    resp = resp.click(href=r'/manage/events/%s/$' % event.id)
504 504
    resp = resp.click('Delete')
505
    assert 'Are you sure you want to delete this?' in resp.text
505
    assert 'Are you sure you want to delete this exception?' in resp.text
506 506

  
507 507
    # suddenly the booking is no longer cancelled, but the admin clicks on the
508 508
    # delete button.
509
-