Add "action" param to members macro

This commit is contained in:
graham-dds 2019-09-27 11:50:11 -04:00
parent 0ed782f4e8
commit e0e6c0569c
3 changed files with 9 additions and 6 deletions

View File

@ -78,6 +78,7 @@
application,
members,
new_member_form,
"applications.settings",
user_can(permissions.CREATE_APPLICATION_MEMBER)) }}
<div class='subheading'>

View File

@ -9,10 +9,14 @@
{% macro MemberManagementTemplate(
application,
members,
new_member_form,
new_member_form,
action,
user_can_create_app_member=False
) %}
{% include "fragments/flash.html" %}
{% if not application.members %}
<div class='empty-state'>
<p class='empty-state__message'>{{ ("portfolios.applications.team_settings.blank_slate.title" | translate) }}</p>
@ -31,7 +35,7 @@
{{ MultiStepModalForm(
name=new_member_modal_name,
form=new_member_form,
form_action=url_for("applications.create_member", application_id=application.id),
form_action=url_for(action, application_id=application.id),
steps=[
member_steps.MemberStepOne(new_member_form),
member_steps.MemberStepTwo(new_member_form, application)
@ -55,9 +59,6 @@
<section class="member-list application-list" id="application-members">
<div class='responsive-table-wrapper panel'>
{% if g.matchesPath("application-members") %}
{% include "fragments/flash.html" %}
{% endif %}
{% for member in members %}
{% set modal_name = "edit_member-{}".format(loop.index) %}
{% call Modal(modal_name) %}
@ -129,7 +130,7 @@
{{ MultiStepModalForm(
name=new_member_modal_name,
form=new_member_form,
form_action=url_for("applications.create_member", application_id=application.id),
form_action=url_for(action, application_id=application.id),
steps=[
member_steps.MemberStepOne(new_member_form),
member_steps.MemberStepTwo(new_member_form, application)

View File

@ -8,5 +8,6 @@
application,
members,
new_member_form,
"applications.update_new_application_step_3",
user_can(permissions.CREATE_APPLICATION_MEMBER)) }}
{% endblock %}