Flashed message after step 1 of app provisioning
- add flash for updating application - add to route logic
This commit is contained in:
@@ -69,9 +69,11 @@ def create_or_update_new_application_step_1(portfolio_id=None, application_id=No
|
|||||||
if application_id:
|
if application_id:
|
||||||
application = Applications.get(application_id)
|
application = Applications.get(application_id)
|
||||||
application = Applications.update(application, form.data)
|
application = Applications.update(application, form.data)
|
||||||
|
flash("application_updated", application_name=application.name)
|
||||||
else:
|
else:
|
||||||
portfolio = Portfolios.get_for_update(portfolio_id)
|
portfolio = Portfolios.get_for_update(portfolio_id)
|
||||||
application = Applications.create(g.current_user, portfolio, **form.data)
|
application = Applications.create(g.current_user, portfolio, **form.data)
|
||||||
|
flash("application_created", application_name=application.name)
|
||||||
return redirect(
|
return redirect(
|
||||||
url_for(
|
url_for(
|
||||||
"applications.update_new_application_step_2",
|
"applications.update_new_application_step_2",
|
||||||
|
@@ -14,6 +14,13 @@ MESSAGES = {
|
|||||||
""",
|
""",
|
||||||
"category": "success",
|
"category": "success",
|
||||||
},
|
},
|
||||||
|
"application_updated": {
|
||||||
|
"title_template": translate("flash.success"),
|
||||||
|
"message_template": """
|
||||||
|
{{ "flash.application.updated" | translate({"application_name": application_name}) }}
|
||||||
|
""",
|
||||||
|
"category": "success",
|
||||||
|
},
|
||||||
"application_deleted": {
|
"application_deleted": {
|
||||||
"title_template": translate("flash.success"),
|
"title_template": translate("flash.success"),
|
||||||
"message_template": """
|
"message_template": """
|
||||||
|
@@ -107,6 +107,7 @@ email:
|
|||||||
flash:
|
flash:
|
||||||
application:
|
application:
|
||||||
created: 'You have successfully created the {application_name} application.'
|
created: 'You have successfully created the {application_name} application.'
|
||||||
|
updated: 'You have successfully updated the {application_name} application.'
|
||||||
deleted: 'You have successfully deleted the {application_name} application. To view the retained activity log, visit the portfolio administration page.'
|
deleted: 'You have successfully deleted the {application_name} application. To view the retained activity log, visit the portfolio administration page.'
|
||||||
delete_member_success: 'You have successfully deleted {member_name} from the portfolio.'
|
delete_member_success: 'You have successfully deleted {member_name} from the portfolio.'
|
||||||
deleted_member: Portfolio member deleted
|
deleted_member: Portfolio member deleted
|
||||||
|
Reference in New Issue
Block a user