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