summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-05-11 15:21:11 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-05-20 18:45:34 +0200
commit29480012e40f85e61568021776d660a9f73b7ea3 (patch)
treec9e1a2d5bbf4b6ddbf7a1ccc63cec6e8d7f3eda8 /ogcp/templates
parentf303240c554fde68ded5aff4a13f96d07508eb7d (diff)
Add "Delete Room" form and view
Creates "delete room" form with a select to choose a room to delete. Adds a new button inside the button group in the scopes view. Because scopes checkboxes values maps to ips the only way to specify the room to delete is in the delete room form itself, using a select input.
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/actions/delete_room.html15
-rw-r--r--ogcp/templates/scopes.html2
2 files changed, 17 insertions, 0 deletions
diff --git a/ogcp/templates/actions/delete_room.html b/ogcp/templates/actions/delete_room.html
new file mode 100644
index 0000000..a5aa529
--- /dev/null
+++ b/ogcp/templates/actions/delete_room.html
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% block content %}
+
+<h1 class="m-5">{{_('Delete room form')}}</h1>
+
+{{ wtf.quick_form(form,
+ action=url_for('action_room_delete'),
+ method='post',
+ button_map={'submit': 'primary'},
+ extra_classes="mx-5") }}
+
+{% endblock %}
+
diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html
index df2b535..3cb84fd 100644
--- a/ogcp/templates/scopes.html
+++ b/ogcp/templates/scopes.html
@@ -61,6 +61,8 @@
formaction="{{ url_for('action_mode') }}" formmethod="get">
<input class="dropdown-item" type="submit" value="{{ _('Add room') }}"
formaction="{{ url_for('action_room_add') }}" formmethod="get">
+ <input class="dropdown-item" type="submit" value="{{ _('Delete room') }}"
+ formaction="{{ url_for('action_room_delete') }}" formmethod="get">
</div>
</div>
</form>