From da5dbc5bdda86cd04a16532f07d607e77d3f0754 Mon Sep 17 00:00:00 2001 From: richard-dds Date: Fri, 24 Aug 2018 13:15:27 -0400 Subject: [PATCH] Redirect to new project form after FV approval --- atst/routes/requests/financial_verification.py | 2 +- templates/workspace_project_new.html | 8 ++++++++ templates/workspace_projects.html | 9 --------- tests/routes/test_financial_verification.py | 2 +- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/atst/routes/requests/financial_verification.py b/atst/routes/requests/financial_verification.py index 8c4e5666..29f5ce39 100644 --- a/atst/routes/requests/financial_verification.py +++ b/atst/routes/requests/financial_verification.py @@ -45,7 +45,7 @@ def update_financial_verification(request_id): new_workspace = Requests.approve_and_create_workspace(updated_request) return redirect( url_for( - "workspaces.workspace_projects", + "workspaces.new_project", workspace_id=new_workspace.id, newWorkspace=True, ) diff --git a/templates/workspace_project_new.html b/templates/workspace_project_new.html index b32178c7..dc19b669 100644 --- a/templates/workspace_project_new.html +++ b/templates/workspace_project_new.html @@ -9,6 +9,14 @@ {% block workspace_content %} {% set modalName = "newProjectConfirmation" %} +{% if request.args.get("newWorkspace") %} + {{ Alert('Workspace created!', + message="\ +

You are now ready to create projects and environments within the JEDI Cloud.

+ ", + level='success' + ) }} +{% endif %}
diff --git a/templates/workspace_projects.html b/templates/workspace_projects.html index cd2a1308..d2af0e17 100644 --- a/templates/workspace_projects.html +++ b/templates/workspace_projects.html @@ -5,15 +5,6 @@ {% block workspace_content %} -{% if request.args.get("newWorkspace") %} - {{ Alert('Workspace created!', - message="\ -

You are now ready to create projects and environments within the JEDI Cloud.

- ", - level='success' - ) }} -{% endif %} - {% for project in workspace.projects %}
diff --git a/tests/routes/test_financial_verification.py b/tests/routes/test_financial_verification.py index d3750ef2..673ee57d 100644 --- a/tests/routes/test_financial_verification.py +++ b/tests/routes/test_financial_verification.py @@ -137,4 +137,4 @@ class TestPENumberInForm: response = self.submit_data(client, data, extended=True) assert response.status_code == 302 - assert "/workspaces" in response.headers.get("Location") + assert "/projects/new" in response.headers.get("Location")