mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-28 18:24:00 -04:00
remove org categories from service setup flow
This commit is contained in:
@@ -1298,14 +1298,7 @@ class CreateServiceForm(StripWhitespaceForm):
|
||||
MustContainAlphanumericCharacters(),
|
||||
Length(max=255, message='Service name must be 255 characters or fewer')
|
||||
])
|
||||
organisation_type = OrganisationTypeField('Who runs this service?')
|
||||
|
||||
|
||||
class CreateNhsServiceForm(CreateServiceForm):
|
||||
organisation_type = OrganisationTypeField(
|
||||
'Who runs this service?',
|
||||
include_only={'nhs_central', 'nhs_local', 'nhs_gp'},
|
||||
)
|
||||
# organisation_type = OrganisationTypeField('Who runs this service?')
|
||||
|
||||
|
||||
class AdminNewOrganisationForm(
|
||||
|
||||
@@ -5,7 +5,7 @@ from notifications_python_client.errors import HTTPError
|
||||
from app import service_api_client
|
||||
from app.formatters import email_safe
|
||||
from app.main import main
|
||||
from app.main.forms import CreateNhsServiceForm, CreateServiceForm
|
||||
from app.main.forms import CreateServiceForm
|
||||
from app.utils.user import user_is_gov_user, user_is_logged_in
|
||||
|
||||
|
||||
@@ -45,14 +45,11 @@ def _create_example_template(service_id):
|
||||
@user_is_logged_in
|
||||
@user_is_gov_user
|
||||
def add_service():
|
||||
default_organisation_type = current_user.default_organisation_type
|
||||
if default_organisation_type == 'nhs':
|
||||
form = CreateNhsServiceForm()
|
||||
default_organisation_type = None
|
||||
else:
|
||||
form = CreateServiceForm(
|
||||
organisation_type=default_organisation_type
|
||||
)
|
||||
# default_organisation_type = current_user.default_organisation_type
|
||||
default_organisation_type = 'central'
|
||||
form = CreateServiceForm(
|
||||
organisation_type=default_organisation_type
|
||||
)
|
||||
|
||||
if form.validate_on_submit():
|
||||
email_from = email_safe(form.name.data)
|
||||
|
||||
Reference in New Issue
Block a user