Form components for changing user environment role
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms.fields import FormField, FieldList, HiddenField, StringField
|
||||
from wtforms.fields import FormField, FieldList, HiddenField, RadioField, StringField
|
||||
from wtforms.validators import Required
|
||||
|
||||
from .application_member import EnvironmentForm
|
||||
from .application_member import EnvironmentForm as BaseEnvironmentForm
|
||||
from .data import ENV_ROLES
|
||||
from .forms import BaseForm
|
||||
from atst.forms.fields import SelectField
|
||||
from atst.domain.permission_sets import PermissionSets
|
||||
from atst.utils.localization import translate
|
||||
|
||||
|
||||
class EnvironmentForm(BaseEnvironmentForm):
|
||||
role = RadioField(
|
||||
"Role",
|
||||
choices=ENV_ROLES,
|
||||
default=None,
|
||||
filters=[lambda x: None if x == "None" else x],
|
||||
)
|
||||
|
||||
|
||||
class PermissionsForm(FlaskForm):
|
||||
perms_team_mgmt = SelectField(
|
||||
translate("portfolios.applications.members.new.manage_team"),
|
||||
|
Reference in New Issue
Block a user