diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 11:09:44 +0200 |
---|---|---|
committer | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-09-04 11:09:44 +0200 |
commit | d5eaf699a7dd5215403b626762b68cd09bc846b5 (patch) | |
tree | 53cd84e4cde844350a55278ade8b2daade44e40e /ogcp/forms | |
parent | 73a6e07b83b76f9677494502bc6e32a7bf48cfd7 (diff) |
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.
Diffstat (limited to 'ogcp/forms')
-rw-r--r-- | ogcp/forms/action_forms.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py new file mode 100644 index 0000000..d6416bd --- /dev/null +++ b/ogcp/forms/action_forms.py @@ -0,0 +1,10 @@ +from wtforms import Form, SubmitField, HiddenField, SelectField +from flask_wtf import FlaskForm +from flask_babel import _ + +class WOLForm(FlaskForm): + ips = HiddenField() + wol_type = SelectField(label=_('Type'), + choices=[('broadcast', 'Broadcast'), + ('unicast', 'Unicast')]) + submit = SubmitField(label=_('Submit')) |