change constant names

This commit is contained in:
dandds
2019-01-11 10:30:09 -05:00
parent d3d36822df
commit 0eec42c55b
19 changed files with 90 additions and 90 deletions

View File

@@ -1,4 +1,4 @@
from atst.domain.roles import WORKSPACE_ROLES as WORKSPACE_ROLE_DEFINITIONS
from atst.domain.roles import PORTFOLIO_ROLES as PORTFOLIO_ROLE_DEFINITIONS
SERVICE_BRANCHES = [
("", "Select an option"),
@@ -105,9 +105,9 @@ COMPLETION_DATE_RANGES = [
("Above 12 months", "Above 12 months"),
]
WORKSPACE_ROLES = [
PORTFOLIO_ROLES = [
(role["name"], {"name": role["display_name"], "description": role["description"]})
for role in WORKSPACE_ROLE_DEFINITIONS
for role in PORTFOLIO_ROLE_DEFINITIONS
if role["name"] is not "officer"
]
@@ -186,7 +186,7 @@ APP_MIGRATION = [
("not_sure", "Not Sure"),
]
PROJECT_COMPLEXITY = [
APPLICATION_COMPLEXITY = [
("storage", "Storage "),
("data_analytics", "Data Analytics "),
("conus", "CONUS Access "),

View File

@@ -4,7 +4,7 @@ from wtforms.validators import Required
from atst.forms.fields import SelectField
from atst.utils.localization import translate
from .data import WORKSPACE_ROLES
from .data import PORTFOLIO_ROLES
class EditMemberForm(FlaskForm):
@@ -13,6 +13,6 @@ class EditMemberForm(FlaskForm):
portfolio_role = SelectField(
translate("forms.edit_member.portfolio_role_label"),
choices=WORKSPACE_ROLES,
choices=PORTFOLIO_ROLES,
validators=[Required()],
)

View File

@@ -7,7 +7,7 @@ from atst.forms.validators import IsNumber
from atst.forms.fields import SelectField
from atst.utils.localization import translate
from .data import WORKSPACE_ROLES
from .data import PORTFOLIO_ROLES
class NewMemberForm(FlaskForm):
@@ -27,7 +27,7 @@ class NewMemberForm(FlaskForm):
)
portfolio_role = SelectField(
translate("forms.new_member.portfolio_role_label"),
choices=WORKSPACE_ROLES,
choices=PORTFOLIO_ROLES,
validators=[Required()],
default="",
description=translate("forms.new_member.portfolio_role_description"),

View File

@@ -18,7 +18,7 @@ from .forms import CacheableForm
from .data import (
SERVICE_BRANCHES,
APP_MIGRATION,
PROJECT_COMPLEXITY,
APPLICATION_COMPLEXITY,
DEV_TEAM,
TEAM_EXPERIENCE,
PERIOD_OF_PERFORMANCE_LENGTH,
@@ -52,7 +52,7 @@ class AppInfoForm(CacheableForm):
complexity = SelectMultipleField(
translate("forms.task_order.complexity_label"),
description=translate("forms.task_order.complexity_description"),
choices=PROJECT_COMPLEXITY,
choices=APPLICATION_COMPLEXITY,
default="",
widget=ListWidget(prefix_label=False),
option_widget=CheckboxInput(),