Allow members to leave organisations
This commit is contained in:
17
templates/modals/confirm-leave-organisation.html.twig
Normal file
17
templates/modals/confirm-leave-organisation.html.twig
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "modals/modal.html.twig" %}
|
||||
|
||||
{% block modal_title %}{{translate("ORGANISATION.LEAVE")}}{% endblock %}
|
||||
|
||||
{% block modal_body %}
|
||||
<form class="js-form" method="delete" action="{{site.uri.public}}/{{form.action}}">
|
||||
{% include "forms/csrf.html.twig" %}
|
||||
<div class="js-form-alerts">
|
||||
</div>
|
||||
<h4>{{translate("ORGANISATION.LEAVE_CONFIRM", {name: organisation.name})}}<br><small>{{translate("LEAVE_CANNOT_UNDONE")}}</small></h4>
|
||||
<br>
|
||||
<div class="btn-group-action">
|
||||
<button type="submit" class="btn btn-danger btn-lg btn-block">{{translate("ORGANISATION.LEAVE_YES")}}</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block" data-dismiss="modal">{{translate("CANCEL")}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -64,6 +64,12 @@
|
||||
</p>
|
||||
{% endif %}
|
||||
{% block organisation_profile %}{% endblock %}
|
||||
{% if checkAccess('leave_organisation') %}
|
||||
<hr>
|
||||
<div class="text-center">
|
||||
<button type="button" class="btn btn-danger js-organisation-leave">{{translate('ORGANISATION.LEAVE')}}</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,7 +101,8 @@
|
||||
true, // deep extend
|
||||
{
|
||||
organisation_slug: "{{organisation.slug}}",
|
||||
delete_redirect: "{{delete_redirect}}"
|
||||
delete_redirect: "{{delete_redirect}}",
|
||||
leave_redirect: "{{leave_redirect}}"
|
||||
},
|
||||
page
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user