present flash message when new portfolio member is added
This commit is contained in:
parent
836fdbdcd2
commit
c7ac967870
@ -84,7 +84,7 @@ def make_flask_callbacks(app):
|
||||
def _set_globals():
|
||||
g.current_user = None
|
||||
g.dev = os.getenv("FLASK_ENV", "dev") == "dev"
|
||||
g.matchesPath = lambda href: re.match("^" + href, request.path)
|
||||
g.matchesPath = lambda href: re.search(href, request.full_path)
|
||||
g.modal = request.args.get("modal", None)
|
||||
g.Authorization = Authorization
|
||||
g.Permissions = Permissions
|
||||
|
@ -92,7 +92,12 @@ def create_member(portfolio_id):
|
||||
flash("new_portfolio_member", new_member=member, portfolio=portfolio)
|
||||
|
||||
return redirect(
|
||||
url_for("portfolios.portfolio_members", portfolio_id=portfolio.id)
|
||||
url_for(
|
||||
"portfolios.portfolio_admin",
|
||||
portfolio_id=portfolio.id,
|
||||
fragment="portfolio-members",
|
||||
_anchor="portfolio-members",
|
||||
)
|
||||
)
|
||||
except AlreadyExistsError:
|
||||
return render_template(
|
||||
|
@ -22,10 +22,9 @@ MESSAGES = {
|
||||
"category": "success",
|
||||
},
|
||||
"new_portfolio_member": {
|
||||
"title_template": "Member added successfully",
|
||||
"title_template": "Success!",
|
||||
"message_template": """
|
||||
<p>{{ new_member.user_name }} was successfully invited via email to this portfolio. They do not yet have access to any environments.</p>
|
||||
<p><a href="{{ url_for('portfolios.update_member', portfolio_id=portfolio.id, member_id=new_member.user_id) }}">Add environment access.</a></p>
|
||||
<p>You have successfully invited {{ new_member.user_name }} to the portfolio admin.</p>
|
||||
""",
|
||||
"category": "success",
|
||||
},
|
||||
|
@ -64,7 +64,7 @@ export default {
|
||||
},
|
||||
handleModalOpen: function(_bool) {
|
||||
this.step = 0
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
computed: {},
|
||||
|
@ -310,6 +310,10 @@
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.alert {
|
||||
margin: 4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.application-content {
|
||||
|
@ -1,10 +1,12 @@
|
||||
{% from "components/icon.html" import Icon %}
|
||||
{% from "components/options_input.html" import OptionsInput %}
|
||||
|
||||
<section class="member-list">
|
||||
<section class="member-list" id="portfolio-members">
|
||||
<div class='responsive-table-wrapper panel'>
|
||||
{% if g.matchesPath("portfolio-members") %}
|
||||
{% include "fragments/flash.html" %}
|
||||
{% endif %}
|
||||
<form method='POST' autocomplete="off" enctype="multipart/form-data">
|
||||
|
||||
<div class='member-list-header'>
|
||||
<div class='left'>
|
||||
<div class='h3'>{{ "portfolios.admin.portfolio_members_title" | translate }}</div>
|
||||
|
@ -9,8 +9,6 @@
|
||||
|
||||
{% block portfolio_content %}
|
||||
|
||||
{% include "fragments/flash.html" %}
|
||||
|
||||
<div v-cloak class="portfolio-admin portfolio-content">
|
||||
|
||||
<div class="panel">
|
||||
|
Loading…
x
Reference in New Issue
Block a user