You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Move the action into BatchCommandAdmin as a static method guarded by
the device change permission
- Hide the target fields when the command runs system wide
- Move the selection warning to the messages framework
- Add unit and selenium tests for the organization scope and the
permissions of the action
Copy file name to clipboardExpand all lines: openwisp_controller/connection/templates/admin/connection/batch_command/execute_command.html
+2-8Lines changed: 2 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -66,14 +66,7 @@ <h2>{% trans "Command" %}</h2>
66
66
{% include "admin/connection/batch_command/form_row.html" with field=form.notes %}
67
67
</fieldset>
68
68
69
-
{% if device_count %}
70
-
<ulclass="messagelist selected-devices-message">
71
-
<liclass="warning">
72
-
{% blocktrans count counter=device_count %}The command will run on the device you selected.{% plural %}The command will run on the {{ counter }} devices you selected.{% endblocktrans %}
73
-
</li>
74
-
</ul>
75
-
{% endif %}
76
-
69
+
{% if not system_wide %}
77
70
<fieldsetclass="module aligned">
78
71
<h2>{% trans "Targets" %}</h2>
79
72
{% include "admin/connection/batch_command/form_row.html" with field=form.organization %}
@@ -82,6 +75,7 @@ <h2>{% trans "Targets" %}</h2>
82
75
{% include "admin/connection/batch_command/form_row.html" with field=form.group %}
83
76
{% endif %}
84
77
</fieldset>
78
+
{% endif %}
85
79
86
80
<divclass="submit-row">
87
81
<aclass="button cancel-link" href="{% url opts|admin_urlname:'changelist' %}">{% trans "Cancel" %}</a>
0 commit comments