From bd839d1e78b7993bdcdecf1bed168407213a6b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 30 Dec 2018 13:26:47 +0100 Subject: [PATCH] lingo/maps: move delete link to objects list (#29382) --- combo/apps/lingo/templates/lingo/regie_form.html | 3 --- combo/apps/lingo/templates/lingo/regie_list.html | 1 + combo/apps/maps/templates/maps/manager_home.html | 1 + combo/apps/maps/templates/maps/map_layer_form.html | 3 --- tests/test_lingo_manager.py | 3 +-- tests/test_maps_manager.py | 3 +-- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/combo/apps/lingo/templates/lingo/regie_form.html b/combo/apps/lingo/templates/lingo/regie_form.html index 0fe3f718..1788859e 100644 --- a/combo/apps/lingo/templates/lingo/regie_form.html +++ b/combo/apps/lingo/templates/lingo/regie_form.html @@ -17,9 +17,6 @@
{% trans 'Cancel' %} - {% if object.id %} - {% trans 'Delete' %} - {% endif %}
{% endblock %} diff --git a/combo/apps/lingo/templates/lingo/regie_list.html b/combo/apps/lingo/templates/lingo/regie_list.html index d2a80314..48dac21d 100644 --- a/combo/apps/lingo/templates/lingo/regie_list.html +++ b/combo/apps/lingo/templates/lingo/regie_list.html @@ -23,6 +23,7 @@ ({{regie.service}}) {% if regie.is_default %}{% trans "(default regie)" %}{% endif %} + {% trans "remove" %} {% endfor %} diff --git a/combo/apps/maps/templates/maps/manager_home.html b/combo/apps/maps/templates/maps/manager_home.html index 2e7c2b63..4531edf8 100644 --- a/combo/apps/maps/templates/maps/manager_home.html +++ b/combo/apps/maps/templates/maps/manager_home.html @@ -14,6 +14,7 @@ {% for layer in object_list %}
  • {{ layer.label }} + {% trans "remove" %}
  • {% endfor %} diff --git a/combo/apps/maps/templates/maps/map_layer_form.html b/combo/apps/maps/templates/maps/map_layer_form.html index 9a97f1d6..e11a5e45 100644 --- a/combo/apps/maps/templates/maps/map_layer_form.html +++ b/combo/apps/maps/templates/maps/map_layer_form.html @@ -22,9 +22,6 @@
    {% trans 'Cancel' %} - {% if object.id %} - {% trans 'Delete' %} - {% endif %}
    {% endblock %} diff --git a/tests/test_lingo_manager.py b/tests/test_lingo_manager.py index b665120f..ffff1f32 100644 --- a/tests/test_lingo_manager.py +++ b/tests/test_lingo_manager.py @@ -63,8 +63,7 @@ def test_delete_regie(app, admin_user): test_add_regie(app, admin_user) app = login(app) resp = app.get('/manage/lingo/regies/', status=200) - resp = resp.click('Test') - resp = resp.click('Delete') + resp = resp.click('remove') assert 'Are you sure you want to delete this?' in resp.text resp = resp.forms[0].submit() assert resp.location.endswith('/manage/lingo/regies/') diff --git a/tests/test_maps_manager.py b/tests/test_maps_manager.py index 659d66cf..edb95b27 100644 --- a/tests/test_maps_manager.py +++ b/tests/test_maps_manager.py @@ -60,8 +60,7 @@ def test_delete_layer(app, admin_user): test_add_layer(app, admin_user) app = login(app) resp = app.get('/manage/maps/', status=200) - resp = resp.click('Test') - resp = resp.click('Delete') + resp = resp.click('remove') assert 'Are you sure you want to delete this?' in resp.text resp = resp.forms[0].submit() assert resp.location.endswith('/manage/maps/')