2020-10-27 13:23:23 +00:00
|
|
|
from wtforms import BooleanField, SelectField
|
|
|
|
from ..models import Role
|
|
|
|
from ..settings.forms import EditGeneralSettingsForm
|
2019-09-10 11:49:01 +00:00
|
|
|
|
|
|
|
|
2020-10-27 13:23:23 +00:00
|
|
|
class EditGeneralSettingsAdminForm(EditGeneralSettingsForm):
|
2019-09-10 11:49:01 +00:00
|
|
|
confirmed = BooleanField('Confirmed')
|
2020-10-27 13:23:23 +00:00
|
|
|
role = SelectField('Role', coerce=int)
|
2019-09-10 11:49:01 +00:00
|
|
|
|
2021-09-13 14:36:48 +00:00
|
|
|
def __init__(self, *args, **kwargs):
|
|
|
|
super().__init__(*args, **kwargs)
|
2020-10-27 13:23:23 +00:00
|
|
|
self.role.choices = [(role.id, role.name)
|
|
|
|
for role in Role.query.order_by(Role.name).all()]
|