mirror of
https://github.com/lucaspalomodevelop/eventcally.git
synced 2026-03-13 08:09:37 +00:00
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
from flask_babel import lazy_gettext
|
|
from flask_wtf import FlaskForm
|
|
from wtforms import SelectField, SubmitField
|
|
from wtforms.validators import DataRequired
|
|
|
|
from project.forms.common import event_rating_choices
|
|
|
|
|
|
class CreateEventReferenceForm(FlaskForm):
|
|
admin_unit_id = SelectField(
|
|
lazy_gettext("Organization"), validators=[DataRequired()], coerce=int
|
|
)
|
|
rating = SelectField(
|
|
lazy_gettext("Rating"),
|
|
default=50,
|
|
coerce=int,
|
|
choices=event_rating_choices,
|
|
description=lazy_gettext(
|
|
"Choose how relevant the event is to your organization. The value is not visible and is used for sorting."
|
|
),
|
|
)
|
|
submit = SubmitField(lazy_gettext("Save reference"))
|
|
|
|
|
|
class UpdateEventReferenceForm(FlaskForm):
|
|
rating = SelectField(
|
|
lazy_gettext("Rating"),
|
|
default=50,
|
|
coerce=int,
|
|
choices=event_rating_choices,
|
|
description=lazy_gettext(
|
|
"Choose how relevant the event is to your organization. The value is not visible and is used for sorting."
|
|
),
|
|
)
|
|
submit = SubmitField(lazy_gettext("Update reference"))
|
|
|
|
|
|
class DeleteReferenceForm(FlaskForm):
|
|
submit = SubmitField(lazy_gettext("Delete reference"))
|