From d5eaf699a7dd5215403b626762b68cd09bc846b5 Mon Sep 17 00:00:00 2001 From: Roberto Hueso Gómez Date: Fri, 4 Sep 2020 11:09:44 +0200 Subject: Add WoL action This action can be applied on one or multiple scopes. This implementation use Flask-WTF as a way to build and valdiate forms. As a side effect, this adds CSRF protection to all forms. --- ogcp/templates/actions/wol.html | 11 +++++++++++ ogcp/templates/scopes.html | 9 ++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 ogcp/templates/actions/wol.html (limited to 'ogcp/templates') diff --git a/ogcp/templates/actions/wol.html b/ogcp/templates/actions/wol.html new file mode 100644 index 0000000..27bb3d3 --- /dev/null +++ b/ogcp/templates/actions/wol.html @@ -0,0 +1,11 @@ +{% extends 'base.html' %} +{% import "bootstrap/wtf.html" as wtf %} + +{% block content %} + +{{ wtf.quick_form(form, + action=url_for('action_wol'), + method='post', + button_map={'submit': 'primary'}) }} + +{% endblock %} diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html index 4603f04..4b9ff28 100644 --- a/ogcp/templates/scopes.html +++ b/ogcp/templates/scopes.html @@ -21,7 +21,8 @@ {% block content %} -
+ + {{ print_scopes_tree(scopes["scope"]) }}
-- cgit v1.2.3-18-g5258