diff options
Diffstat (limited to 'ogcp/templates')
-rw-r--r-- | ogcp/templates/actions/wol.html | 11 | ||||
-rw-r--r-- | ogcp/templates/scopes.html | 9 |
2 files changed, 17 insertions, 3 deletions
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 %} -<form method="post"> +<form> + <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/> {{ print_scopes_tree(scopes["scope"]) }} <div class="dropdown"> @@ -31,10 +32,12 @@ {{ _('Actions') }} </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> + <input class="dropdown-item" type="submit" value="{{ _('Run') }}" + formaction="{{ url_for('action_wol') }}" formmethod="get"> <input class="dropdown-item" type="submit" value="{{ _('Poweroff') }}" - formaction="{{ url_for('action_poweroff') }}"> + formaction="{{ url_for('action_poweroff') }}" formmethod="post"> <input class="dropdown-item" type="submit" value="{{ _('Reboot') }}" - formaction="{{ url_for('action_reboot') }}"> + formaction="{{ url_for('action_reboot') }}" formmethod="post"> </div> </div> </form> |