Pass environment role choices directly from the view to the template instead of via the form
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms.validators import Optional, Required
|
||||
from wtforms.validators import Required
|
||||
|
||||
from atst.forms.fields import SelectField
|
||||
|
||||
from .data import WORKSPACE_ROLES, ENVIRONMENT_ROLES
|
||||
from .data import WORKSPACE_ROLES
|
||||
|
||||
|
||||
class EditMemberForm(FlaskForm):
|
||||
# This form also accepts a field for each environment in each project
|
||||
# that the user is a member of
|
||||
|
||||
workspace_role = SelectField(
|
||||
"Workspace Role", choices=WORKSPACE_ROLES, validators=[Required()]
|
||||
)
|
||||
|
||||
environment_role = SelectField(
|
||||
"Environment Role", choices=ENVIRONMENT_ROLES, validators=[Optional()]
|
||||
)
|
||||
|
Reference in New Issue
Block a user