Re-jigged some of the registration routes and modified the buttons/links to use them

This commit is contained in:
2022-02-10 14:52:48 +00:00
parent 7c319873b1
commit c3cf97ea50
6 changed files with 86 additions and 16 deletions

View File

@@ -57,11 +57,8 @@
</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>
<button type="button" class="btn btn-success js-organisation-approveRegistration" data-slug="{{organisation.slug}}">{{translate('APPROVE')}}</button>
<button type="button" class="btn btn-danger js-organisation-rejectRegistration" data-slug="{{organisation.slug}}">{{translate('REJECT')}}</button>
{% elseif isOrganisationAdmin(organisation) %}
<button type="button" class="btn btn-danger js-organisation-cancelRegistration" data-slug="{{organisation.slug}}">{{translate('CANCEL_REGISTRATION')}}</button>
{% endif %}