mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
17 lines
487 B
Python
17 lines
487 B
Python
from app.models import Role
|
|
from flask_wtf import FlaskForm
|
|
from wtforms import BooleanField, SelectField, SubmitField
|
|
|
|
|
|
class AdminEditUserForm(FlaskForm):
|
|
confirmed = BooleanField('Confirmed')
|
|
role = SelectField('Role')
|
|
submit = SubmitField('Submit')
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super().__init__(*args, **kwargs)
|
|
self.role.choices = [
|
|
(role.hashid, role.name)
|
|
for role in Role.query.order_by(Role.name).all()
|
|
]
|