0001-lingo-maps-move-delete-link-to-objects-list-29382.patch
combo/apps/lingo/templates/lingo/regie_form.html | ||
---|---|---|
17 | 17 |
<div class="buttons"> |
18 | 18 |
<button class="submit-button">{% trans "Save" %}</button> |
19 | 19 |
<a class="cancel" href="{% url 'lingo-manager-homepage' %}">{% trans 'Cancel' %}</a> |
20 |
{% if object.id %} |
|
21 |
<a class="delete" rel="popup" href="{% url 'lingo-manager-regie-delete' pk=object.id %}">{% trans 'Delete' %}</a> |
|
22 |
{% endif %} |
|
23 | 20 |
</div> |
24 | 21 |
</form> |
25 | 22 |
{% endblock %} |
combo/apps/lingo/templates/lingo/regie_list.html | ||
---|---|---|
23 | 23 |
<span>({{regie.service}})</span> |
24 | 24 |
{% if regie.is_default %}<span class="extra-info">{% trans "(default regie)" %}</span>{% endif %} |
25 | 25 |
</a> |
26 |
<a rel="popup" class="delete" href="{% url 'lingo-manager-regie-delete' pk=regie.id %}">{% trans "remove" %}</a> |
|
26 | 27 |
</li> |
27 | 28 |
{% endfor %} |
28 | 29 |
</ul> |
combo/apps/maps/templates/maps/manager_home.html | ||
---|---|---|
14 | 14 |
{% for layer in object_list %} |
15 | 15 |
<li> |
16 | 16 |
<a class="layer-icon-{{ layer.icon }}" href="{% url 'maps-manager-layer-edit' slug=layer.slug %}">{{ layer.label }}</a> |
17 |
<a rel="popup" class="delete" href="{% url 'maps-manager-layer-delete' slug=layer.slug %}">{% trans "remove" %}</a> |
|
17 | 18 |
</li> |
18 | 19 |
{% endfor %} |
19 | 20 |
</ul> |
combo/apps/maps/templates/maps/map_layer_form.html | ||
---|---|---|
22 | 22 |
<div class="buttons"> |
23 | 23 |
<button class="submit-button">{% trans "Save" %}</button> |
24 | 24 |
<a class="cancel" href="{% url 'maps-manager-homepage' %}">{% trans 'Cancel' %}</a> |
25 |
{% if object.id %} |
|
26 |
<a class="delete" rel="popup" href="{% url 'maps-manager-layer-delete' slug=object.slug %}">{% trans 'Delete' %}</a> |
|
27 |
{% endif %} |
|
28 | 25 |
</div> |
29 | 26 |
</form> |
30 | 27 |
{% endblock %} |
tests/test_lingo_manager.py | ||
---|---|---|
63 | 63 |
test_add_regie(app, admin_user) |
64 | 64 |
app = login(app) |
65 | 65 |
resp = app.get('/manage/lingo/regies/', status=200) |
66 |
resp = resp.click('Test') |
|
67 |
resp = resp.click('Delete') |
|
66 |
resp = resp.click('remove') |
|
68 | 67 |
assert 'Are you sure you want to delete this?' in resp.text |
69 | 68 |
resp = resp.forms[0].submit() |
70 | 69 |
assert resp.location.endswith('/manage/lingo/regies/') |
tests/test_maps_manager.py | ||
---|---|---|
60 | 60 |
test_add_layer(app, admin_user) |
61 | 61 |
app = login(app) |
62 | 62 |
resp = app.get('/manage/maps/', status=200) |
63 |
resp = resp.click('Test') |
|
64 |
resp = resp.click('Delete') |
|
63 |
resp = resp.click('remove') |
|
65 | 64 |
assert 'Are you sure you want to delete this?' in resp.text |
66 | 65 |
resp = resp.forms[0].submit() |
67 | 66 |
assert resp.location.endswith('/manage/maps/') |
68 |
- |