|
Lines 1-11
Link Here
|
|
|
1 |
[% PROCESS 'i18n.inc' %] |
| 1 |
[% USE Branches %] |
2 |
[% USE Branches %] |
| 2 |
[% USE AuthorisedValues %] |
3 |
[% USE AuthorisedValues %] |
| 3 |
[% INCLUDE 'doc-head-open.inc' %] |
4 |
[% INCLUDE 'doc-head-open.inc' %] |
| 4 |
<title>Koha › Tools › Patron clubs › |
5 |
<title>[% t('Koha › Tools › Patron clubs ›') %] |
| 5 |
[% IF club_template %] |
6 |
[% IF club_template %] |
| 6 |
Modify club template [% club_template.name %] |
7 |
[% t('Modify club template') %] [% club_template.name %] |
| 7 |
[% ELSE %] |
8 |
[% ELSE %] |
| 8 |
Create a new club template |
9 |
[% t('Create a new club template') %] |
| 9 |
[% END %] |
10 |
[% END %] |
| 10 |
</title> |
11 |
</title> |
| 11 |
[% INCLUDE 'doc-head-close.inc' %] |
12 |
[% INCLUDE 'doc-head-close.inc' %] |
|
Lines 20-30
Link Here
|
| 20 |
<body id="clubs_templates_add_modify" class="clubs"> |
21 |
<body id="clubs_templates_add_modify" class="clubs"> |
| 21 |
[% INCLUDE 'header.inc' %] |
22 |
[% INCLUDE 'header.inc' %] |
| 22 |
[% INCLUDE 'cat-search.inc' %] |
23 |
[% INCLUDE 'cat-search.inc' %] |
| 23 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a> › <a href="clubs.pl">Patron clubs</a> › |
24 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">[% t('Home') %]</a> › <a href="/cgi-bin/koha/tools/tools-home.pl">[% t('Tools') %]</a> › <a href="clubs.pl">[% t('Patron clubs') %]</a> › |
| 24 |
[% IF club_template %] |
25 |
[% IF club_template %] |
| 25 |
Modify club template <i>[% club_template.name %]</i> |
26 |
[% t('Modify club template') %] <i>[% club_template.name %]</i> |
| 26 |
[% ELSE %] |
27 |
[% ELSE %] |
| 27 |
Create a new club template |
28 |
[% t('Create a new club template') %] |
| 28 |
[% END %] |
29 |
[% END %] |
| 29 |
</div> |
30 |
</div> |
| 30 |
|
31 |
|
|
Lines 37-45
Link Here
|
| 37 |
|
38 |
|
| 38 |
<h2> |
39 |
<h2> |
| 39 |
[% IF club_template %] |
40 |
[% IF club_template %] |
| 40 |
Modify club template <i>[% club_template.name %]</i> |
41 |
[% t('Modify club template') %] <i>[% club_template.name %]</i> |
| 41 |
[% ELSE %] |
42 |
[% ELSE %] |
| 42 |
Create a new club template |
43 |
[% t('Create a new club template') %] |
| 43 |
[% END %] |
44 |
[% END %] |
| 44 |
</h2> |
45 |
</h2> |
| 45 |
|
46 |
|
|
Lines 47-114
Link Here
|
| 47 |
<fieldset class="rows"> |
48 |
<fieldset class="rows"> |
| 48 |
<ol> |
49 |
<ol> |
| 49 |
<li> |
50 |
<li> |
| 50 |
<label class="required" for="name">Name:</label> |
51 |
<label class="required" for="name">[% t('Name:') %]</label> |
| 51 |
<input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required"/> |
52 |
<input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required" /> |
| 52 |
<span class="required">Required</span> |
53 |
<span class="required">[% t('Required') %]</span> |
| 53 |
</li> |
54 |
</li> |
| 54 |
|
55 |
|
| 55 |
<li> |
56 |
<li> |
| 56 |
<label for="club-template-description">Description:</label> |
57 |
<label for="club-template-description">[% t('Description:') %]</label> |
| 57 |
<input id="club-template-description" name="description" type="text" value="[% club_template.description %]" /> |
58 |
<input id="club-template-description" name="description" type="text" value="[% club_template.description %]" /> |
| 58 |
</li> |
59 |
</li> |
| 59 |
|
60 |
|
| 60 |
<li> |
61 |
<li> |
| 61 |
<label for="club-template-is-enrollable-from-opac">Allow public enrollment:</label> |
62 |
<label for="club-template-is-enrollable-from-opac">[% t('Allow public enrollment:') %]</label> |
| 62 |
[% IF club_template.is_enrollable_from_opac %] |
63 |
[% IF club_template.is_enrollable_from_opac %] |
| 63 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" /> |
64 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" /> |
| 64 |
[% ELSE %] |
65 |
[% ELSE %] |
| 65 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" /> |
66 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" /> |
| 66 |
[% END %] |
67 |
[% END %] |
| 67 |
<span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span> |
68 |
<span class="hint">[% t('If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.') %]</span> |
| 68 |
</li> |
69 |
</li> |
| 69 |
|
70 |
|
| 70 |
<li> |
71 |
<li> |
| 71 |
<label for="club-template-is-email-required">Require valid email address:</label> |
72 |
<label for="club-template-is-email-required">[% t('Require valid email address:') %]</label> |
| 72 |
[% IF club_template.is_email_required %] |
73 |
[% IF club_template.is_email_required %] |
| 73 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" /> |
74 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" /> |
| 74 |
[% ELSE %] |
75 |
[% ELSE %] |
| 75 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" /> |
76 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" /> |
| 76 |
[% END %] |
77 |
[% END %] |
| 77 |
<span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span> |
78 |
<span class="hint">[% t('If set, a club based on this template can only be enrolled in by patrons with a valid email address.') %]</span> |
| 78 |
</li> |
79 |
</li> |
| 79 |
|
80 |
|
| 80 |
<li> |
81 |
<li> |
| 81 |
<label for="club-template-branchcode">Library:</label> |
82 |
<label for="club-template-branchcode">[% t('Library:') %]</label> |
| 82 |
<select name="branchcode" id="club-template-branchcode"> |
83 |
<select name="branchcode" id="club-template-branchcode"> |
| 83 |
<option value=""></option> |
84 |
<option value=""></option> |
| 84 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] |
85 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] |
| 85 |
</select> |
86 |
</select> |
| 86 |
<div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div> |
87 |
<div class="hint">[% t('If set, only librarians logged in with this branch will be able to modify this club template.') %]</div> |
| 87 |
</li> |
88 |
</li> |
| 88 |
|
89 |
|
| 89 |
</ol> |
90 |
</ol> |
| 90 |
</fieldset> |
91 |
</fieldset> |
| 91 |
|
92 |
|
| 92 |
<fieldset class="rows"> |
93 |
<fieldset class="rows"> |
| 93 |
<legend>Club fields:</legend> |
94 |
<legend>[% t('Club fields:') %]</legend> |
| 94 |
<p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p> |
95 |
<p><span class="hint">[% t('These fields will be used in the creation of clubs based on this template') %]</span></p> |
| 95 |
<div id="club-template-fields"> |
96 |
<div id="club-template-fields"> |
| 96 |
[% FOREACH f IN club_template.club_template_fields %] |
97 |
[% FOREACH f IN club_template.club_template_fields %] |
| 97 |
<div class="club-field"> |
98 |
<div class="club-field"> |
| 98 |
<ol class="clearfix"> |
99 |
<ol class="clearfix"> |
| 99 |
<input type="hidden" name="club_template_field_id" value="[% f.id %]" /> |
100 |
<input type="hidden" name="club_template_field_id" value="[% f.id %]" /> |
| 100 |
<li> |
101 |
<li> |
| 101 |
<label for="field-name-[% f.id %]">Name:</label> |
102 |
<label for="field-name-[% f.id %]">[% t('Name:') %]</label> |
| 102 |
<input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" /> |
103 |
<input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" /> |
| 103 |
</li> |
104 |
</li> |
| 104 |
|
105 |
|
| 105 |
<li> |
106 |
<li> |
| 106 |
<label for="field-description-[% f.id %]">Description:</label> |
107 |
<label for="field-description-[% f.id %]">[% t('Description:') %]</label> |
| 107 |
<input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" /> |
108 |
<input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" /> |
| 108 |
</li> |
109 |
</li> |
| 109 |
|
110 |
|
| 110 |
<li> |
111 |
<li> |
| 111 |
<label for="field-authorised-value-category-[% f.id %]">Authorised value category:</label> |
112 |
<label for="field-authorised-value-category-[% f.id %]">[% t('Authorised value category:') %]</label> |
| 112 |
<select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]"> |
113 |
<select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]"> |
| 113 |
<option value=""></option> |
114 |
<option value=""></option> |
| 114 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
115 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
|
Lines 116-122
Link Here
|
| 116 |
</li> |
117 |
</li> |
| 117 |
|
118 |
|
| 118 |
<li> |
119 |
<li> |
| 119 |
<label for="field-delete-[% f.id %]">Delete field:</label> |
120 |
<label for="field-delete-[% f.id %]">[% t('Delete field:') %]</label> |
| 120 |
<input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" /> |
121 |
<input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" /> |
| 121 |
</li> |
122 |
</li> |
| 122 |
</ol> |
123 |
</ol> |
|
Lines 125-159
Link Here
|
| 125 |
</div> |
126 |
</div> |
| 126 |
<fieldset class="action"> |
127 |
<fieldset class="action"> |
| 127 |
<a href="#" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;"> |
128 |
<a href="#" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;"> |
| 128 |
<i class="fa fa-plus"></i> Add new field |
129 |
<i class="fa fa-plus"></i> [% t('Add new field') %] |
| 129 |
</a> |
130 |
</a> |
| 130 |
</fieldset> |
131 |
</fieldset> |
| 131 |
</fieldset> |
132 |
</fieldset> |
| 132 |
|
133 |
|
| 133 |
<fieldset class="rows"> |
134 |
<fieldset class="rows"> |
| 134 |
<legend>Enrollment fields</legend> |
135 |
<legend>[% t('Enrollment fields') %]</legend> |
| 135 |
<p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p> |
136 |
<p><span class="hint">[% t('These fields will be used when enrolling a patron in a club based on this template') %]</span></p> |
| 136 |
<div id="club-template-enrollment-fields"> |
137 |
<div id="club-template-enrollment-fields"> |
| 137 |
[% FOREACH f IN club_template.club_template_enrollment_fields %] |
138 |
[% FOREACH f IN club_template.club_template_enrollment_fields %] |
| 138 |
<div class="enrollment-field"> |
139 |
<div class="enrollment-field"> |
| 139 |
<ol class="clearfix"> |
140 |
<ol class="clearfix"> |
| 140 |
<li> |
141 |
<li> |
| 141 |
<span class="label"> </span> |
142 |
<span class="label"> </span> |
| 142 |
<strong>Enrollment field</strong> |
143 |
<strong>[% t('Enrollment field') %]</strong> |
| 143 |
</li> |
144 |
</li> |
| 144 |
<li> |
145 |
<li> |
| 145 |
<input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" /> |
146 |
<input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" /> |
| 146 |
<label for="enrollment-field-name-[% f.id %]">Name:</label> |
147 |
<label for="enrollment-field-name-[% f.id %]">[% t('Name:') %]</label> |
| 147 |
<input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" size="40" /> |
148 |
<input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" size="40" /> |
| 148 |
</li> |
149 |
</li> |
| 149 |
|
150 |
|
| 150 |
<li> |
151 |
<li> |
| 151 |
<label for="enrollment-field-description-[% f.id %]">Description:</label> |
152 |
<label for="enrollment-field-description-[% f.id %]">[% t('Description:') %]</label> |
| 152 |
<input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" size="40" /> |
153 |
<input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" size="40" /> |
| 153 |
</li> |
154 |
</li> |
| 154 |
|
155 |
|
| 155 |
<li> |
156 |
<li> |
| 156 |
<label for="enrollment-field-authorised-value-category-[% f.id %]">Authorised value category:</label> |
157 |
<label for="enrollment-field-authorised-value-category-[% f.id %]">[% t('Authorised value category:') %]</label> |
| 157 |
<select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]"> |
158 |
<select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]"> |
| 158 |
<option value=""></option> |
159 |
<option value=""></option> |
| 159 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
160 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
|
Lines 161-167
Link Here
|
| 161 |
</li> |
162 |
</li> |
| 162 |
|
163 |
|
| 163 |
<li> |
164 |
<li> |
| 164 |
<label for="enrollment-field-delete-[% f.id %]">Delete field:</label> |
165 |
<label for="enrollment-field-delete-[% f.id %]">[% t('Delete field:') %]</label> |
| 165 |
<input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" /> |
166 |
<input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" /> |
| 166 |
</li> |
167 |
</li> |
| 167 |
</ol> |
168 |
</ol> |
|
Lines 170-176
Link Here
|
| 170 |
</div> |
171 |
</div> |
| 171 |
<fieldset class="action"> |
172 |
<fieldset class="action"> |
| 172 |
<a href="#" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;"> |
173 |
<a href="#" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;"> |
| 173 |
<i class="fa fa-plus"></i> Add new field |
174 |
<i class="fa fa-plus"></i> [% t('Add new field') %] |
| 174 |
</a> |
175 |
</a> |
| 175 |
</fieldset> |
176 |
</fieldset> |
| 176 |
</fieldset> |
177 |
</fieldset> |
|
Lines 178-184
Link Here
|
| 178 |
<fieldset class="action"> |
179 |
<fieldset class="action"> |
| 179 |
<input type="hidden" name="id" value="[% club_template.id %]" /> |
180 |
<input type="hidden" name="id" value="[% club_template.id %]" /> |
| 180 |
<input type="submit" value="Save" /> |
181 |
<input type="submit" value="Save" /> |
| 181 |
<a href="clubs.pl" class="cancel">Cancel</a> |
182 |
<a href="clubs.pl" class="cancel">[% t('Cancel') %]</a> |
| 182 |
</fieldset> |
183 |
</fieldset> |
| 183 |
</form> |
184 |
</form> |
| 184 |
|
185 |
|
|
Lines 187-242
Link Here
|
| 187 |
|
188 |
|
| 188 |
|
189 |
|
| 189 |
<div id="new-field-template" class="club-field" style="display:none"> |
190 |
<div id="new-field-template" class="club-field" style="display:none"> |
| 190 |
<h4 style="margin-left:1em;">New club field</h4> |
191 |
<h4 style="margin-left:1em;">[% t('New club field') %]</h4> |
| 191 |
<input type="hidden" name="club_template_field_id" value="" /> |
192 |
<input type="hidden" name="club_template_field_id" value="" /> |
| 192 |
<ol class="clearfix"> |
193 |
<ol class="clearfix"> |
| 193 |
|
194 |
|
| 194 |
<li> |
195 |
<li> |
| 195 |
<label for="club_template_field_name">Name:</label> |
196 |
<label for="club_template_field_name">[% t('Name:') %]</label> |
| 196 |
<input name="club_template_field_name" /> |
197 |
<input name="club_template_field_name" /> |
| 197 |
</li> |
198 |
</li> |
| 198 |
|
199 |
|
| 199 |
<li> |
200 |
<li> |
| 200 |
<label for="club_template_field_description">Description:</label> |
201 |
<label for="club_template_field_description">[% t('Description:') %]</label> |
| 201 |
<input name="club_template_field_description" /> |
202 |
<input name="club_template_field_description" /> |
| 202 |
</li> |
203 |
</li> |
| 203 |
|
204 |
|
| 204 |
<li> |
205 |
<li> |
| 205 |
<label for="club_template_field_authorised_value_category">Authorised value category:</label> |
206 |
<label for="club_template_field_authorised_value_category">[% t('Authorised value category:') %]</label> |
| 206 |
<select name="club_template_field_authorised_value_category"> |
207 |
<select name="club_template_field_authorised_value_category"> |
| 207 |
<option value=""></option> |
208 |
<option value=""></option> |
| 208 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
209 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
| 209 |
</select> |
210 |
</select> |
| 210 |
</li> |
211 |
</li> |
| 211 |
</ol> |
212 |
</ol> |
| 212 |
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset> |
213 |
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> [% t('Delete field') %]</a></fieldset> |
| 213 |
<hr/> |
214 |
<hr /> |
| 214 |
</div> |
215 |
</div> |
| 215 |
|
216 |
|
| 216 |
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none"> |
217 |
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none"> |
| 217 |
<h4 style="margin-left:1em;">New enrollment field</h4> |
218 |
<h4 style="margin-left:1em;">[% t('New enrollment field') %]</h4> |
| 218 |
<input type="hidden" name="club_template_enrollment_field_id" value="" /> |
219 |
<input type="hidden" name="club_template_enrollment_field_id" value="" /> |
| 219 |
<ol class="clearfix"> |
220 |
<ol class="clearfix"> |
| 220 |
|
221 |
|
| 221 |
<li> |
222 |
<li> |
| 222 |
<label for="club_template_enrollment_field_name">Name:</label> |
223 |
<label for="club_template_enrollment_field_name">[% t('Name:') %]</label> |
| 223 |
<input name="club_template_enrollment_field_name" /> |
224 |
<input name="club_template_enrollment_field_name" /> |
| 224 |
</li> |
225 |
</li> |
| 225 |
|
226 |
|
| 226 |
<li> |
227 |
<li> |
| 227 |
<label for="club_template_enrollment_field_description">Description:</label> |
228 |
<label for="club_template_enrollment_field_description">[% t('Description:') %]</label> |
| 228 |
<input name="club_template_enrollment_field_description" /> |
229 |
<input name="club_template_enrollment_field_description" /> |
| 229 |
</li> |
230 |
</li> |
| 230 |
|
231 |
|
| 231 |
<li> |
232 |
<li> |
| 232 |
<label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label> |
233 |
<label for="club_template_enrollment_field_authorised_value_category">[% t('Authorised value category:') %]</label> |
| 233 |
<select name="club_template_enrollment_field_authorised_value_category"> |
234 |
<select name="club_template_enrollment_field_authorised_value_category"> |
| 234 |
<option value=""></option> |
235 |
<option value=""></option> |
| 235 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
236 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
| 236 |
</select> |
237 |
</select> |
| 237 |
</li> |
238 |
</li> |
| 238 |
</ol> |
239 |
</ol> |
| 239 |
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset> |
240 |
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> [% t('Delete field') %]</a></fieldset> |
| 240 |
</div> |
241 |
</div> |
| 241 |
|
242 |
|
| 242 |
[% INCLUDE 'intranet-bottom.inc' %] |
243 |
[% INCLUDE 'intranet-bottom.inc' %] |
| 243 |
- |
|
|