View | Details | Raw Unified | Return to bug 36883
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt (-1 / +1 lines)
Lines 88-94 function cancelEnrollment( id ) { Link Here
88
    $.ajax({
88
    $.ajax({
89
        type: "POST",
89
        type: "POST",
90
        url: '/cgi-bin/koha/svc/club/cancel_enrollment',
90
        url: '/cgi-bin/koha/svc/club/cancel_enrollment',
91
        data: { id: id },
91
        data: { id: id, csrf_token: $('meta[name="csrf-token"]').attr('content'), },
92
        success: function( data ) {
92
        success: function( data ) {
93
            if ( data.success ) {
93
            if ( data.success ) {
94
                $('#opac-user-clubs_panel').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrower.borrowernumber | html %]', function() {
94
                $('#opac-user-clubs_panel').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrower.borrowernumber | html %]', function() {
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/enroll.tt (-2 / +3 lines)
Lines 38-47 Link Here
38
<script>
38
<script>
39
function addEnrollment() {
39
function addEnrollment() {
40
    $("body").css("cursor", "progress");
40
    $("body").css("cursor", "progress");
41
    let data = $( "#patron-enrollment-form" ).serialize();
42
    data += '&csrf_token='+$('meta[name="csrf-token"]').attr('content');
41
    $.ajax({
43
    $.ajax({
42
        type: "POST",
44
        type: "POST",
43
        url: '/cgi-bin/koha/svc/club/enroll',
45
        url: '/cgi-bin/koha/svc/club/enroll',
44
        data: $( "#patron-enrollment-form" ).serialize(),
46
        data,
45
        success: function( data ) {
47
        success: function( data ) {
46
            if ( data.success ) {
48
            if ( data.success ) {
47
                $('#opac-user-clubs_panel').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() {
49
                $('#opac-user-clubs_panel').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber | html %]&id=[% club.id | html %]', function() {
48
- 

Return to bug 36883