Skip to content

Commit 7017cb1

Browse files
committed
[test] Fixed device delete confirmation page
1 parent 6795f36 commit 7017cb1

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

openwisp_controller/config/static/config/css/device-delete-confirmation.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#deactivating-warning .warning p {
22
margin-top: 0px;
33
}
4+
#deactivating-warning .messagelist button {
5+
font-size: 15px;
6+
vertical-align: middle;
7+
line-height: inherit !important;
8+
padding: 0.625rem 1rem;
9+
}
10+
#deactivating-warning .messagelist button + button {
11+
margin-left: 10px;
12+
}
413
#main ul.messagelist li.warning ul li {
514
display: list-item;
615
padding: 0px;

openwisp_controller/config/static/config/js/device-delete-confirmation.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
(function ($) {
44
$(document).ready(function () {
55
$("#warning-ack").click(function (event) {
6-
event.preventDefault();
76
$("#deactivating-warning").slideUp("fast");
87
$("#delete-confirm-container").slideDown("fast");
98
$('input[name="force_delete"]').val("true");

openwisp_controller/config/templates/admin/config/device/delete_confirmation.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@
4646
but its configuration will remain active.
4747
{% endblocktranslate %}
4848
</p>
49-
<form>
50-
<input type="submit" class="button danger-btn" id="warning-ack"
51-
value="{% translate 'I understand the risks, delete the device' %}">
52-
<a class="button cancel-link">{% translate 'No, take me back' %}</a>
53-
</form>
49+
<span>
50+
<button class="danger-btn" id="warning-ack">{% translate 'I understand the risks, delete the device' %}</button>
51+
<button class="button cancel-link">{% translate 'No, take me back' %}</button>
52+
</span>
5453
</li>
5554
</ul>
5655
</div>

openwisp_controller/config/templates/admin/config/device/delete_selected_confirmation.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,10 @@
5050
but their configurations will remain active.
5151
{% endblocktranslate %}
5252
</p>
53-
<form>
54-
<input type="submit" class="button danger-btn" id="warning-ack"
55-
value="{% blocktranslate count counter=active_devices|length %}I understand the risks, delete the device{% plural %}I understand the risks, delete the devices{% endblocktranslate %}">
56-
<a class="button cancel-link">{% translate 'No, take me back' %}</a>
57-
</form>
53+
<span>
54+
<button class="danger-btn" id="warning-ack">"{% blocktranslate count counter=active_devices|length %}I understand the risks, delete the device{% plural %}I understand the risks, delete the devices{% endblocktranslate %}</button>
55+
<button class="button cancel-link">{% translate 'No, take me back' %}</button>
56+
</span>
5857
</li>
5958
</ul>
6059
</div>

0 commit comments

Comments
 (0)