summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-08-12 10:38:04 +0200
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-09-27 09:48:35 +0200
commit2614c9304eef5fbbe33898c0e5e804b76cab8ba5 (patch)
treecf0f606667b9f6ae5aacb9ca603bb9f6642757fc /ogcp/templates
parent75dc842284c095fe6bb7de2a4604cb308e626859 (diff)
Add a client to a room using the scopes tree
With this commit users can select a room from the scopes tree, and then add a client to that room.
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/macros.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index 4da76d6..28c4f5a 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -23,7 +23,13 @@
{% macro scopes_tree_collapse_level(scopes, parent_id, state) -%}
{% for scope in scopes %}
<li id="{{ scope["name"]|replace(".", "_")|replace(" ", "_") }}_{{ scope["id"] }}" class="nav-item">
- {% if " ".join(scope["ip"]) %}
+ {% if scope["type"] == "room" %}
+ <input class="form-check-input" type="checkbox" form="scopesForm"
+ value="{{ scope["id"] }}"
+ {% if state %}style="filter: grayscale(100%);" onclick="return false;"{% endif %}
+ {% if scope.get("selected", False) %}checked{% endif %}
+ name="scope-room" />
+ {% elif " ".join(scope["ip"]) %}
<input class="form-check-input" type="checkbox" form="scopesForm"
value="{{ " ".join(scope["ip"]) }}"
{% if state %}style="filter: grayscale(100%);" onclick="return false;"{% endif %}