summaryrefslogtreecommitdiffstats
path: root/ogcp/forms/action_forms.py
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2021-05-14 12:36:40 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-06-30 17:20:17 +0200
commit1e7fce971acd38f072a07cf436d2a94897176be3 (patch)
tree033c0679bab0681fffc0e77c7b4d969ff539d05e /ogcp/forms/action_forms.py
parent42dc44323e4cf0eaf0b563ba02f368942cf86e3d (diff)
Create "Add Center" form and view
Creates "add center" form with "name" as required input and "comment" as optional input. In the future, the CenterForm can be used to display center information once such functionality lands in the ogserver.
Diffstat (limited to 'ogcp/forms/action_forms.py')
-rw-r--r--ogcp/forms/action_forms.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ogcp/forms/action_forms.py b/ogcp/forms/action_forms.py
index 0404e71..2286941 100644
--- a/ogcp/forms/action_forms.py
+++ b/ogcp/forms/action_forms.py
@@ -113,6 +113,12 @@ class ImageCreateForm(FlaskForm):
description = StringField(label=_('Description'))
create = SubmitField(label=_('Create'))
+class CenterForm(FlaskForm):
+ name = StringField(label=_('Center name'),
+ validators=[InputRequired()])
+ comment = StringField(label=_('Comment'))
+ submit = SubmitField(label=_('Submit'))
+
class RoomForm(FlaskForm):
center = SelectField(label=_('Center'),
validators=[InputRequired()])