Lines 1-7
Link Here
|
1 |
[% USE AuthorisedValues %] |
1 |
[% USE AuthorisedValues %] |
2 |
[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] |
2 |
[% SET AuthorisedValuesCategories = AuthorisedValues.GetCategories %] |
3 |
|
3 |
|
4 |
<h1> |
4 |
<h1 id="heading"> |
5 |
Enroll in <em>[% club.name | html %]</em> |
5 |
Enroll in <em>[% club.name | html %]</em> |
6 |
</h1> |
6 |
</h1> |
7 |
|
7 |
|
Lines 9-16
Link Here
|
9 |
<form id="patron-enrollment-form"> |
9 |
<form id="patron-enrollment-form"> |
10 |
<input type="hidden" name="id" value="[% club.id | html %]" /> |
10 |
<input type="hidden" name="id" value="[% club.id | html %]" /> |
11 |
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" /> |
11 |
<input type="hidden" name="borrowernumber" value="[% borrowernumber | html %]" /> |
|
|
12 |
<input type="hidden" name="enrollent_id" value="[% enrollent_id | html %]" /> |
12 |
<fieldset class="rows"> |
13 |
<fieldset class="rows"> |
13 |
<ol> |
14 |
<ol> |
|
|
15 |
[% IF club_enrollment_fields %] |
16 |
[% FOREACH f IN club.club_template.club_template_enrollment_fields %] |
17 |
[% FOREACH c IN club_enrollment_fields %] |
18 |
[% IF f.id == c.club_template_enrollment_field_id %] |
19 |
<li> |
20 |
<label>[% f.name %]</label> |
21 |
[% IF f.authorised_value_category %] |
22 |
<select name="[% f.id %]"> |
23 |
[% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %] |
24 |
<option value="[% a.authorised_value %]" [% IF a.authorised_value == c.value %]selected="selected"[% END %]>[% a.lib %]</option> |
25 |
[% END %] |
26 |
</select> |
27 |
[% ELSE %] |
28 |
<input type="text" name="[% f.id %]" value="[% c.value %]"/> |
29 |
[% END %] |
30 |
<span class="hint">[% f.description %]</span> |
31 |
</li> |
32 |
[% END %] |
33 |
[% END %] |
34 |
[% END %] |
35 |
[% ELSE %] |
14 |
[% FOREACH f IN club.club_template.club_template_enrollment_fields %] |
36 |
[% FOREACH f IN club.club_template.club_template_enrollment_fields %] |
15 |
<li> |
37 |
<li> |
16 |
<label>[% f.name | html %]</label> |
38 |
<label>[% f.name | html %]</label> |
Lines 26-32
Link Here
|
26 |
<span class="hint">[% f.description | html %]</span> |
48 |
<span class="hint">[% f.description | html %]</span> |
27 |
</li> |
49 |
</li> |
28 |
[% END %] |
50 |
[% END %] |
29 |
|
51 |
[% END %] |
30 |
<li> |
52 |
<li> |
31 |
<a href="#" class="btn btn-sm btn-default" onclick="addEnrollment(); return false;">Finish enrollment</a> |
53 |
<a href="#" class="btn btn-sm btn-default" onclick="addEnrollment(); return false;">Finish enrollment</a> |
32 |
<a class="cancel" href="#" onclick="showClubs(); return false;">Cancel</a> |
54 |
<a class="cancel" href="#" onclick="showClubs(); return false;">Cancel</a> |
Lines 37-42
Link Here
|
37 |
</div> |
59 |
</div> |
38 |
|
60 |
|
39 |
<script> |
61 |
<script> |
|
|
62 |
if([% enrollent_id %]){ |
63 |
$("#heading").html(_("Modifying enrollment")+" <em>[% club.name %]</em>"); |
64 |
} |
40 |
function addEnrollment() { |
65 |
function addEnrollment() { |
41 |
$("body").css("cursor", "progress"); |
66 |
$("body").css("cursor", "progress"); |
42 |
$.ajax({ |
67 |
$.ajax({ |