diff --git a/atst/forms/application_member.py b/atst/forms/application_member.py index 4e54a17b..12e71873 100644 --- a/atst/forms/application_member.py +++ b/atst/forms/application_member.py @@ -1,3 +1,4 @@ +from flask_wtf import FlaskForm from wtforms.fields import FormField, FieldList, HiddenField, BooleanField from .forms import BaseForm @@ -8,13 +9,18 @@ from atst.domain.permission_sets import PermissionSets from atst.utils.localization import translate -class EnvironmentForm(BaseForm): +class EnvironmentForm(FlaskForm): environment_id = HiddenField() environment_name = HiddenField() - role = SelectField(environment_name, choices=ENV_ROLES, default=None) + role = SelectField( + environment_name, + choices=ENV_ROLES, + default=None, + filters=[lambda x: None if x == "None" else x], + ) -class PermissionsForm(BaseForm): +class PermissionsForm(FlaskForm): perms_env_mgmt = BooleanField( translate("portfolios.applications.members.new.manage_envs"), default=False ) diff --git a/js/components/options_input.js b/js/components/options_input.js index a2ad1838..fa4d8a57 100644 --- a/js/components/options_input.js +++ b/js/components/options_input.js @@ -18,6 +18,7 @@ export default { showError: showError, showValid: !showError && !!this.initialValue, validationError: this.initialErrors.join(' '), + value: this.initialValue, } }, diff --git a/styles/sections/_application_edit.scss b/styles/sections/_application_edit.scss index ab642442..3b106c1e 100644 --- a/styles/sections/_application_edit.scss +++ b/styles/sections/_application_edit.scss @@ -85,3 +85,8 @@ .environment-roles-new__head { font-weight: $font-bold; } + +.environment-name--gray { + font-weight: $font-normal; + color: $color-gray-medium; +} diff --git a/templates/fragments/applications/add_new_application_member.html b/templates/fragments/applications/add_new_application_member.html index 1f55efde..cba84e70 100644 --- a/templates/fragments/applications/add_new_application_member.html +++ b/templates/fragments/applications/add_new_application_member.html @@ -5,7 +5,7 @@ {% set step_one %}