1 [% USE AuthorisedValues %]
2 [% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %]
5 Enroll in <i>[% club.name %]</i>
8 <div class="container">
9 <form id="patron-enrollment-form">
10 <input type="hidden" name="id" value="[% club.id %]" />
11 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
12 <fieldset class="rows">
14 [% FOREACH f IN club.club_template.club_template_enrollment_fields %]
16 <label>[% f.name %]</label>
17 [% IF f.authorised_value_category %]
18 <select name="[% f.id %]">
19 [% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
20 <option value="[% a.authorised_value %]">[% a.lib %]</option>
24 <input type="text" name="[% f.id %]" />
26 <span class="hint">[% f.description %]</span>
31 <button class="btn btn-default" onclick="addEnrollment(); return false;">Finish enrollment</button>
32 <a href="#" onclick="showClubs(); return false;">Cancel</a>
39 <script type="text/javascript">
40 function addEnrollment() {
41 $("body").css("cursor", "progress");
44 url: '/cgi-bin/koha/svc/club/enroll',
45 data: $( "#patron-enrollment-form" ).serialize(),
46 success: function( data ) {
48 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber %]&id=[% club.id %]', function() {
49 $("body").css("cursor", "default");
52 alert(_("Unable to create enrollment!"));
60 function showClubs() {
61 $("body").css("cursor", "progress");
62 $('#opac-user-clubs').load('/cgi-bin/koha/clubs/clubs-tab.pl?borrowernumber=[% borrowernumber %]&id=[% club.id %]', function() {
63 $("body").css("cursor", "default");