frontend for adding new application member

- updated styling
- eliminated stray <form> tag in application team template
This commit is contained in:
dandds
2019-04-24 13:43:38 -04:00
parent ade77e6b91
commit 9c84e30172
10 changed files with 266 additions and 89 deletions

View File

@@ -2,9 +2,10 @@ from wtforms.fields import FormField, FieldList, HiddenField, BooleanField
from .forms import BaseForm
from .member import NewForm as BaseNewMemberForm
from .data import ENV_ROLES
from .data import FORMATTED_ENV_ROLES as ENV_ROLES
from atst.forms.fields import SelectField
from atst.domain.permission_sets import PermissionSets
from atst.utils.localization import translate
class EnvironmentForm(BaseForm):
@@ -14,9 +15,15 @@ class EnvironmentForm(BaseForm):
class PermissionsForm(BaseForm):
perms_env_mgmt = BooleanField(None, default=False)
perms_team_mgmt = BooleanField(None, default=False)
perms_del_env = BooleanField(None, default=False)
perms_env_mgmt = BooleanField(
translate("portfolios.applications.members.new.manage_envs"), default=False
)
perms_team_mgmt = BooleanField(
translate("portfolios.applications.members.new.manage_team"), default=False
)
perms_del_env = BooleanField(
translate("portfolios.applications.members.new.delete_envs"), default=False
)
@property
def data(self):

View File

@@ -219,3 +219,6 @@ REQUIRED_DISTRIBUTIONS = [
]
ENV_ROLES = [(role.value, role.value) for role in CSPRole] + [(None, "No access")]
FORMATTED_ENV_ROLES = [(role.value, "- {} -".format(role.value)) for role in CSPRole] + [
(None, "- No Access -")
]