Organisation registration process implemented with configurable approval workflow
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="slug" autocomplete="off" value="{{organisation.slug}}">
|
||||
{% endif %}
|
||||
{% if 'description' not in form.fields.hidden %}
|
||||
<div class="col-sm-12">
|
||||
|
||||
16
templates/mail/organisation-approval-approved.html.twig
Normal file
16
templates/mail/organisation-approval-approved.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
{% block subject %}
|
||||
{{site.title}} - organisation registration approved
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>
|
||||
Dear {{recipient.first_name}},
|
||||
</p>
|
||||
<p>
|
||||
The organisation registration request you submitted at {{site.title}} ({{site.uri.public}}) has been approved.
|
||||
</p>
|
||||
<p>
|
||||
With regards,<br>
|
||||
The {{site.title}} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
16
templates/mail/organisation-approval-rejected.html.twig
Normal file
16
templates/mail/organisation-approval-rejected.html.twig
Normal file
@@ -0,0 +1,16 @@
|
||||
{% block subject %}
|
||||
{{site.title}} - organisation registration rejected
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>
|
||||
Dear {{recipient.first_name}},
|
||||
</p>
|
||||
<p>
|
||||
The organisation registration request you submitted at {{site.title}} ({{site.uri.public}}) has been rejected.
|
||||
</p>
|
||||
<p>
|
||||
With regards,<br>
|
||||
The {{site.title}} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
46
templates/mail/organisation-approval-request.html.twig
Normal file
46
templates/mail/organisation-approval-request.html.twig
Normal file
@@ -0,0 +1,46 @@
|
||||
{% block subject %}
|
||||
{{site.title}} - new organisation requires approval
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<p>
|
||||
Dear {{recipient.first_name}},
|
||||
</p>
|
||||
<p>
|
||||
Someone has created a new organisation which requires approving at {{site.title}} ({{site.uri.public}}).
|
||||
</p>
|
||||
<p>
|
||||
The organisation details are:
|
||||
<dl>
|
||||
<dt>Requester name:</dt>
|
||||
<dd>{{requester.full_name}}</dd>
|
||||
|
||||
<dt>Requester email:</dt>
|
||||
<dd>{{requester.email}}</dd>
|
||||
|
||||
<dt>Organisation name:</dt>
|
||||
<dd>{{organisation.name}}</dd>
|
||||
|
||||
<dt>Organisation description:</dt>
|
||||
<dd>{{organisation.description}}</dd>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
You may verify or reject this organisation via the control dashboard (<a href="{{site.uri.public}}/organisations">{{site.uri.public}}/organisations</a>).
|
||||
</p>
|
||||
<p>
|
||||
To verify this organisation immediately you may do so by visiting: <a href="{{site.uri.public}}/organisations/approve?token={{token}}">{{site.uri.public}}/organisations/approve?token={{token}}</a>.
|
||||
</p>
|
||||
<p>
|
||||
To reject this organisation immediately you may do so by visiting: <a href="{{site.uri.public}}/organisations/reject?token={{token}}">{{site.uri.public}}/organisations/reject?token={{token}}</a>.
|
||||
</p>
|
||||
{% if approval_expiration %}
|
||||
<p>
|
||||
The approcal period for this organisation will expire in {{approval_expiration}} at which point the organisation will be automatically rejected.
|
||||
</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
With regards,<br>
|
||||
The {{site.title}} Team
|
||||
</p>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,17 @@
|
||||
{% extends "modals/modal.html.twig" %}
|
||||
|
||||
{% block modal_title %}{{translate("ORGANISATION.CANCEL_REGISTRATION")}}{% 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.CANCEL_REGISTRATION_CONFIRM", {name: organisation.name})}}{% if delete_hard %}<br><small>{{translate("DELETE_CANNOT_UNDONE")}}</small>{% endif %}</h4>
|
||||
<br>
|
||||
<div class="btn-group-action">
|
||||
<button type="submit" class="btn btn-danger btn-lg btn-block">{{translate("ORGANISATION.CANCEL_REGISTRATION_YES")}}</button>
|
||||
<button type="button" class="btn btn-default btn-lg btn-block" data-dismiss="modal">{{translate("CANCEL")}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -50,6 +50,23 @@
|
||||
{{organisation.description}}
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if organisation.flag_approved != 1 %}
|
||||
<hr>
|
||||
<h4 class="text-danger text-center">
|
||||
{{ translate('ORGANISATION.APPROVAL.PENDING') }}
|
||||
</h4>
|
||||
<div class="text-center">
|
||||
{% if checkAccess('approve_organisation') %}
|
||||
<form method="POST">
|
||||
{% include "forms/csrf.html.twig" %}
|
||||
<button type="submit" class="btn btn-success" formaction="{{site.uri.public}}/organisations/o/{{organisation.slug}}/registration/approve">{{translate('APPROVE')}}</button>
|
||||
<button type="submit" class="btn btn-danger" formaction="{{site.uri.public}}/organisations/o/{{organisation.slug}}/registration/reject">{{translate('REJECT')}}</button>
|
||||
</form>
|
||||
{% elseif isOrganisationAdmin(organisation) %}
|
||||
<button type="button" class="btn btn-danger js-organisation-cancelRegistration" data-slug="{{organisation.slug}}">{{translate('CANCEL_REGISTRATION')}}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if 'members' not in fields.hidden %}
|
||||
<hr>
|
||||
<strong><i class="fas fa-wrench margin-r-5"></i> {{ translate('ADMIN', 2)}}</strong>
|
||||
|
||||
@@ -26,13 +26,18 @@
|
||||
}
|
||||
%}
|
||||
</div>
|
||||
{% if checkAccess('create_organisation') %}
|
||||
<div class="box-footer">
|
||||
{% if checkAccess('create_organisation') %}
|
||||
<button type="button" class="btn btn-success js-organisation-create">
|
||||
<i class="fas fa-plus-square"></i> {{translate("ORGANISATION.CREATE")}}
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if checkAccess('register_organisation') %}
|
||||
<button type="button" class="btn btn-success js-organisation-register">
|
||||
<i class="fas fa-plus-square"></i> {{translate("ORGANISATION.REGISTER")}}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user