Update flash messages for portfolio invites to match application invite messages.

Use None instead of an empty string for titles and messages in flash alerts.
This commit is contained in:
leigh-mil 2020-01-21 10:59:38 -05:00
parent 6f85f6de97
commit ce70e44590
3 changed files with 12 additions and 11 deletions

View File

@ -65,7 +65,7 @@ def resend_invitation(portfolio_id, portfolio_token):
inviter_name=g.current_user.full_name, inviter_name=g.current_user.full_name,
token=invite.token, token=invite.token,
) )
flash("resend_portfolio_invitation", user_name=invite.user_name) flash("resend_portfolio_invitation", email=invite.email)
else: else:
user_name = f"{form['user_data']['first_name'].data} {form['user_data']['last_name'].data}" user_name = f"{form['user_data']['first_name'].data} {form['user_data']['last_name'].data}"
flash("resend_portfolio_invitation_error", user_name=user_name) flash("resend_portfolio_invitation_error", user_name=user_name)

View File

@ -29,7 +29,7 @@ MESSAGES = {
"category": "error", "category": "error",
}, },
"application_invite_resent": { "application_invite_resent": {
"title": "", "title": None,
"message": "flash.application_invite.resent.message", "message": "flash.application_invite.resent.message",
"category": "success", "category": "success",
}, },
@ -90,7 +90,7 @@ MESSAGES = {
}, },
"insufficient_funds": { "insufficient_funds": {
"title": "flash.task_order.insufficient_funds.title", "title": "flash.task_order.insufficient_funds.title",
"message": "flash.task_order.insufficient_funds.message", "message": None,
"category": "warning", "category": "warning",
}, },
"logged_out": { "logged_out": {
@ -104,13 +104,13 @@ MESSAGES = {
"category": "warning", "category": "warning",
}, },
"new_application_member": { "new_application_member": {
"title": None, "title": "flash.new_application_member.title",
"message": "flash.new_application_member.message", "message": "flash.new_application_member.message",
"category": "success", "category": "success",
}, },
"new_portfolio_member": { "new_portfolio_member": {
"title": "flash.success", "title": "flash.new_portfolio_member.title",
"message": "flash.new_portfolio_member", "message": "flash.new_portfolio_member.message",
"category": "success", "category": "success",
}, },
"portfolio_member_removed": { "portfolio_member_removed": {
@ -124,7 +124,7 @@ MESSAGES = {
"category": "success", "category": "success",
}, },
"resend_portfolio_invitation": { "resend_portfolio_invitation": {
"title": "flash.portfolio_invite.resent.title", "title": None,
"message": "flash.portfolio_invite.resent.message", "message": "flash.portfolio_invite.resent.message",
"category": "success", "category": "success",
}, },

View File

@ -136,7 +136,9 @@ flash:
logged_out: logged_out:
title: Logged out title: Logged out
message: You've been logged out. message: You've been logged out.
new_portfolio_member: 'You have successfully invited {user_name} to the portfolio.' new_portfolio_member:
title: "{user_name}'s invitation has been sent"
message: "{user_name}'s access to this Portfolio is pending until they sign in for the first time."
new_ppoc_message: 'You have successfully added {ppoc_name} as the primary point of contact. You are no longer the PPoC.' new_ppoc_message: 'You have successfully added {ppoc_name} as the primary point of contact. You are no longer the PPoC.'
new_ppoc_title: Primary point of contact updated new_ppoc_title: Primary point of contact updated
portfolio_member: portfolio_member:
@ -151,8 +153,7 @@ flash:
message: An unexpected problem occurred with your request, please try again. If the problem persists, contact an administrator. message: An unexpected problem occurred with your request, please try again. If the problem persists, contact an administrator.
portfolio_invite: portfolio_invite:
resent: resent:
title: Invitation resent message: "{email} has been sent an invitation to access this Application"
message: Successfully sent a new invitation to {user_name}.
error: error:
title: Portfolio invitation error title: Portfolio invitation error
message: There was an error processing the invitation for {user_name}. message: There was an error processing the invitation for {user_name}.
@ -165,11 +166,11 @@ flash:
task_order: task_order:
insufficient_funds: insufficient_funds:
title: Insufficient Funds title: Insufficient Funds
message: ""
submitted: submitted:
title: Your Task Order has been uploaded successfully. title: Your Task Order has been uploaded successfully.
message: Your task order form for {task_order.portfolio_name} has been submitted. message: Your task order form for {task_order.portfolio_name} has been submitted.
new_application_member: new_application_member:
title: "{user_name}'s invitation has been sent"
message: "{user_name}'s access to this Application is pending until they sign in for the first time." message: "{user_name}'s access to this Application is pending until they sign in for the first time."
updated_application_team_settings: 'You have updated the {application_name} team settings.' updated_application_team_settings: 'You have updated the {application_name} team settings.'
user: user: