|
Lines 22-27
Link Here
|
| 22 |
.club-field, |
22 |
.club-field, |
| 23 |
.enrollment-field { |
23 |
.enrollment-field { |
| 24 |
border-top: 1px solid #ddd; |
24 |
border-top: 1px solid #ddd; |
|
|
25 |
padding-top: 1rem; |
| 25 |
} |
26 |
} |
| 26 |
</style> |
27 |
</style> |
| 27 |
</head> |
28 |
</head> |
|
Lines 62-192
Link Here
|
| 62 |
[% END %] |
63 |
[% END %] |
| 63 |
</h1> |
64 |
</h1> |
| 64 |
|
65 |
|
| 65 |
<fieldset class="rows"> |
66 |
<fieldset class="fg"> |
| 66 |
<ol> |
67 |
<div class="fg-row"> |
| 67 |
<li> |
68 |
<div class="fg-label"> |
| 68 |
<label class="required" for="name">Name:</label> |
69 |
<label class="required" for="club-template-name">Name:</label> |
|
|
70 |
</div> |
| 71 |
<div class="fg-input"> |
| 69 |
<input id="club-template-name" name="name" type="text" value="[% club_template.name | html %]" required="required" /> |
72 |
<input id="club-template-name" name="name" type="text" value="[% club_template.name | html %]" required="required" /> |
| 70 |
<span class="required">Required</span> |
73 |
</div> |
| 71 |
</li> |
74 |
<div class="required">Required</div> |
|
|
75 |
</div> |
| 72 |
|
76 |
|
| 73 |
<li> |
77 |
<div class="fg-row"> |
|
|
78 |
<div class="fg-label"> |
| 74 |
<label for="club-template-description">Description:</label> |
79 |
<label for="club-template-description">Description:</label> |
|
|
80 |
</div> |
| 81 |
<div class="fg-input"> |
| 75 |
<input id="club-template-description" name="description" type="text" value="[% club_template.description | html %]" /> |
82 |
<input id="club-template-description" name="description" type="text" value="[% club_template.description | html %]" /> |
| 76 |
</li> |
83 |
</div> |
|
|
84 |
</div> |
| 77 |
|
85 |
|
| 78 |
<li> |
86 |
<div class="fg-row input-checkbox"> |
| 79 |
<label for="club-template-is-enrollable-from-opac">Allow public enrollment:</label> |
87 |
<div class="fg-label"> |
|
|
88 |
<label for="club-template-is-enrollable-from-opac">Allow public enrollment</label> |
| 89 |
</div> |
| 90 |
<div class="fg-input"> |
| 80 |
[% IF club_template.is_enrollable_from_opac %] |
91 |
[% IF club_template.is_enrollable_from_opac %] |
| 81 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" /> |
92 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" /> |
| 82 |
[% ELSE %] |
93 |
[% ELSE %] |
| 83 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" /> |
94 |
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" /> |
| 84 |
[% END %] |
95 |
[% END %] |
| 85 |
<span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span> |
96 |
</div> |
| 86 |
</li> |
97 |
<div class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</div> |
|
|
98 |
</div> |
| 87 |
|
99 |
|
| 88 |
<li> |
100 |
<div class="fg-row input-checkbox"> |
| 89 |
<label for="club-template-is-email-required">Require valid email address:</label> |
101 |
<div class="fg-label"> |
|
|
102 |
<label for="club-template-is-email-required">Require valid email address</label> |
| 103 |
</div> |
| 104 |
<div class="fg-input"> |
| 90 |
[% IF club_template.is_email_required %] |
105 |
[% IF club_template.is_email_required %] |
| 91 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" /> |
106 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" /> |
| 92 |
[% ELSE %] |
107 |
[% ELSE %] |
| 93 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" /> |
108 |
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" /> |
| 94 |
[% END %] |
109 |
[% END %] |
| 95 |
<span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span> |
110 |
</div> |
| 96 |
</li> |
111 |
<div class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</div> |
|
|
112 |
</div> |
| 97 |
|
113 |
|
| 98 |
<li> |
114 |
<div class="fg-row"> |
|
|
115 |
<div class="fg-label"> |
| 99 |
<label for="club-template-branchcode">Library:</label> |
116 |
<label for="club-template-branchcode">Library:</label> |
|
|
117 |
</div> |
| 118 |
<div class="fg-input"> |
| 100 |
<select name="branchcode" id="club-template-branchcode"> |
119 |
<select name="branchcode" id="club-template-branchcode"> |
| 101 |
<option value=""></option> |
120 |
<option value="">None</option> |
| 102 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] |
121 |
[% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %] |
| 103 |
</select> |
122 |
</select> |
| 104 |
<div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div> |
123 |
</div> |
| 105 |
</li> |
124 |
<div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div> |
| 106 |
</ol> |
125 |
</div> |
| 107 |
</fieldset> |
126 |
</fieldset> |
| 108 |
|
127 |
|
| 109 |
<fieldset class="rows"> |
128 |
<div class="page-section"> |
| 110 |
<legend>Club fields:</legend> |
129 |
<h2>Club fields</h2> |
| 111 |
<p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p> |
130 |
<p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p> |
| 112 |
<div id="club-template-fields"> |
131 |
<div id="club-template-fields"> |
| 113 |
[% FOREACH f IN club_template.club_template_fields %] |
132 |
<fieldset class="fg"> |
| 114 |
<div class="club-field"> |
133 |
[% FOREACH f IN club_template.club_template_fields %] |
| 115 |
<ol class="clearfix"> |
134 |
<div class="club-field"> |
| 116 |
<input type="hidden" name="club_template_field_id" value="[% f.id | html %]" /> |
135 |
<input type="hidden" name="club_template_field_id" value="[% f.id | html %]" /> |
| 117 |
<li> |
|
|
| 118 |
<label for="field-name-[% f.id | html %]">Name:</label> |
| 119 |
<input type="text" name="club_template_field_name" id="field-name-[% f.id | html %]" value="[% f.name | html %]" /> |
| 120 |
</li> |
| 121 |
|
| 122 |
<li> |
| 123 |
<label for="field-description-[% f.id | html %]">Description:</label> |
| 124 |
<input type="text" name="club_template_field_description" id="field-description-[% f.id | html %]" value="[% f.description | html %]" /> |
| 125 |
</li> |
| 126 |
|
136 |
|
| 127 |
<li> |
137 |
<div class="fg-row"> |
| 128 |
<label for="field-authorised-value-category-[% f.id | html %]">Authorised value category:</label> |
138 |
<div class="fg-label"> |
| 129 |
<select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id | html %]"> |
139 |
<label for="field-name-[% f.id | html %]">Name:</label> |
| 130 |
<option value=""></option> |
140 |
</div> |
| 131 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
141 |
<div class="fg-input"> |
| 132 |
</select> |
142 |
<input type="text" name="club_template_field_name" id="field-name-[% f.id | html %]" value="[% f.name | html %]" /> |
| 133 |
</li> |
143 |
</div> |
| 134 |
|
144 |
</div> |
| 135 |
<li> |
145 |
<div class="fg-row"> |
| 136 |
<label for="field-delete-[% f.id | html %]">Delete field:</label> |
146 |
<div class="fg-label"> |
| 137 |
<input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id | html %]" value="[% f.id | html %]" /> |
147 |
<label for="field-description-[% f.id | html %]">Description:</label> |
| 138 |
</li> |
148 |
</div> |
| 139 |
</ol> |
149 |
<div class="fg-input"> |
| 140 |
</div> |
150 |
<input type="text" name="club_template_field_description" id="field-description-[% f.id | html %]" value="[% f.description | html %]" /> |
| 141 |
[% END %] |
151 |
</div> |
|
|
152 |
</div> |
| 153 |
<div class="fg-row"> |
| 154 |
<div class="fg-label"> |
| 155 |
<label for="field-authorised-value-category-[% f.id | html %]">Authorised value category:</label> |
| 156 |
</div> |
| 157 |
<div class="fg-input"> |
| 158 |
<select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id | html %]"> |
| 159 |
<option value="">None</option> |
| 160 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
| 161 |
</select> |
| 162 |
</div> |
| 163 |
</div> |
| 164 |
<div class="fg-row input-checkbox"> |
| 165 |
<div class="fg-label"> |
| 166 |
<label for="field-delete-[% f.id | html %]">Check to delete this field upon saving</label> |
| 167 |
</div> |
| 168 |
<div class="fg-input"> |
| 169 |
<input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id | html %]" value="[% f.id | html %]" /> |
| 170 |
</div> |
| 171 |
</div> |
| 172 |
</div> |
| 173 |
[% END %] |
| 174 |
</fieldset> |
| 142 |
</div> |
175 |
</div> |
| 143 |
<fieldset class="action"> |
176 |
<fieldset class="action"> |
| 144 |
<a href="#" class="add_club_field"> <i class="fa fa-plus"></i> Add new field </a> |
177 |
<a href="#" class="add_club_field"> <i class="fa fa-plus"></i> Add new field </a> |
| 145 |
</fieldset> |
178 |
</fieldset> |
| 146 |
</fieldset> |
179 |
</div> |
| 147 |
|
180 |
|
| 148 |
<fieldset class="rows"> |
181 |
<div class="page-section"> |
| 149 |
<legend>Enrollment fields</legend> |
182 |
<h2>Enrollment fields</h2> |
| 150 |
<p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p> |
183 |
<p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p> |
| 151 |
<div id="club-template-enrollment-fields"> |
184 |
<div id="club-template-enrollment-fields"> |
| 152 |
[% FOREACH f IN club_template.club_template_enrollment_fields %] |
185 |
<fieldset class="fg"> |
| 153 |
<div class="enrollment-field"> |
186 |
[% FOREACH f IN club_template.club_template_enrollment_fields %] |
| 154 |
<ol class="clearfix"> |
187 |
<div class="enrollment-field"> |
| 155 |
<li> |
188 |
<div class="fg-row"> |
| 156 |
<span class="label"> </span> |
189 |
<div class="fg-label"> |
| 157 |
<strong>Enrollment field</strong> |
190 |
<input type="hidden" name="club_template_enrollment_field_id" value="[% f.id | html %]" /> |
| 158 |
</li> |
191 |
<label for="enrollment-field-name-[% f.id | html %]">Name:</label> |
| 159 |
<li> |
192 |
</div> |
| 160 |
<input type="hidden" name="club_template_enrollment_field_id" value="[% f.id | html %]" /> |
193 |
<div class="fg-input"> |
| 161 |
<label for="enrollment-field-name-[% f.id | html %]">Name:</label> |
194 |
<input type="text" name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id | html %]" value="[% f.name | html %]" /> |
| 162 |
<input type="text" name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id | html %]" value="[% f.name | html %]" size="40" /> |
195 |
</div> |
| 163 |
</li> |
196 |
</div> |
| 164 |
|
197 |
|
| 165 |
<li> |
198 |
<div class="fg-row"> |
| 166 |
<label for="enrollment-field-description-[% f.id | html %]">Description:</label> |
199 |
<div class="fg-label"> |
| 167 |
<input type="text" name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id | html %]" value="[% f.description | html %]" size="40" /> |
200 |
<label for="enrollment-field-description-[% f.id | html %]">Description:</label> |
| 168 |
</li> |
201 |
</div> |
|
|
202 |
<div class="fg-input"> |
| 203 |
<input type="text" name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id | html %]" value="[% f.description | html %]" /> |
| 204 |
</div> |
| 205 |
</div> |
| 169 |
|
206 |
|
| 170 |
<li> |
207 |
<div class="fg-row"> |
| 171 |
<label for="enrollment-field-authorised-value-category-[% f.id | html %]">Authorised value category:</label> |
208 |
<div class="fg-label"> |
| 172 |
<select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id | html %]"> |
209 |
<label for="enrollment-field-authorised-value-category-[% f.id | html %]">Authorised value category:</label> |
| 173 |
<option value=""></option> |
210 |
</div> |
| 174 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
211 |
<div class="fg-input"> |
| 175 |
</select> |
212 |
<select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id | html %]"> |
| 176 |
</li> |
213 |
<option value="">None</option> |
|
|
214 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %] |
| 215 |
</select> |
| 216 |
</div> |
| 217 |
</div> |
| 177 |
|
218 |
|
| 178 |
<li> |
219 |
<div class="fg-row input-checkbox"> |
| 179 |
<label for="enrollment-field-delete-[% f.id | html %]">Delete field:</label> |
220 |
<div class="fg-label"> |
| 180 |
<input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id | html %]" value="[% f.id | html %]" /> |
221 |
<label for="enrollment-field-delete-[% f.id | html %]">Check to delete this field upon saving</label> |
| 181 |
</li> |
222 |
</div> |
| 182 |
</ol> |
223 |
<div class="fg-input"> |
| 183 |
</div> |
224 |
<input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id | html %]" value="[% f.id | html %]" /> |
| 184 |
[% END %] |
225 |
</div> |
|
|
226 |
</div> |
| 227 |
</div> |
| 228 |
[% END %] |
| 229 |
</fieldset> |
| 185 |
</div> |
230 |
</div> |
| 186 |
<fieldset class="action"> |
231 |
<fieldset class="action"> |
| 187 |
<a href="#" class="add_enrollment_field"> <i class="fa fa-plus"></i> Add new field </a> |
232 |
<a href="#" class="add_enrollment_field"> <i class="fa fa-plus"></i> Add new field </a> |
| 188 |
</fieldset> |
233 |
</fieldset> |
| 189 |
</fieldset> |
234 |
</div> |
| 190 |
|
235 |
|
| 191 |
<fieldset class="action"> |
236 |
<fieldset class="action"> |
| 192 |
<input type="hidden" name="id" value="[% club_template.id | html %]" /> |
237 |
<input type="hidden" name="id" value="[% club_template.id | html %]" /> |
|
Lines 197-254
Link Here
|
| 197 |
[% END %] |
242 |
[% END %] |
| 198 |
|
243 |
|
| 199 |
<div id="new-field-template" class="club-field" style="display:none"> |
244 |
<div id="new-field-template" class="club-field" style="display:none"> |
| 200 |
<h4 style="margin-left:1em;">New club field</h4> |
245 |
<fieldset class="fg"> |
| 201 |
<input type="hidden" name="club_template_field_id" value="" /> |
246 |
<legend>New club field</legend> |
| 202 |
<ol class="clearfix"> |
247 |
<input type="hidden" name="club_template_field_id" value="" /> |
| 203 |
<li> |
248 |
<div class="fg-row"> |
| 204 |
<label for="club_template_field_name">Name:</label> |
249 |
<div class="fg-label"> |
| 205 |
<input type="text" name="club_template_field_name" /> |
250 |
<label for="club_template_field_name">Name:</label> |
| 206 |
</li> |
251 |
</div> |
|
|
252 |
<div class="fg-input"> |
| 253 |
<input type="text" name="club_template_field_name" /> |
| 254 |
</div> |
| 255 |
</div> |
| 207 |
|
256 |
|
| 208 |
<li> |
257 |
<div class="fg-row"> |
| 209 |
<label for="club_template_field_description">Description:</label> |
258 |
<div class="fg-label"> |
| 210 |
<input type="text" name="club_template_field_description" /> |
259 |
<label for="club_template_field_description">Description:</label> |
| 211 |
</li> |
260 |
</div> |
|
|
261 |
<div class="fg-input"> |
| 262 |
<input type="text" name="club_template_field_description" /> |
| 263 |
</div> |
| 264 |
</div> |
| 212 |
|
265 |
|
| 213 |
<li> |
266 |
<div class="fg-row"> |
| 214 |
<label for="club_template_field_authorised_value_category">Authorised value category:</label> |
267 |
<div class="fg-label"> |
| 215 |
<select name="club_template_field_authorised_value_category"> |
268 |
<label for="club_template_field_authorised_value_category">Authorised value category:</label> |
| 216 |
<option value=""></option> |
269 |
</div> |
| 217 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
270 |
<div class="fg-input"> |
| 218 |
</select> |
271 |
<select name="club_template_field_authorised_value_category"> |
| 219 |
</li> |
272 |
<option value="">None</option> |
| 220 |
</ol> |
273 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
| 221 |
<fieldset class="action" |
274 |
</select> |
| 222 |
><a href="#" class="delete_club_field"><i class="fa fa-trash-can"></i> Delete field</a></fieldset |
275 |
</div> |
| 223 |
> |
276 |
</div> |
|
|
277 |
</fieldset> |
| 278 |
<fieldset class="action"> |
| 279 |
<a href="#" class="delete_club_field"><i class="fa fa-trash-can"></i> Delete field</a> |
| 280 |
</fieldset> |
| 224 |
<hr /> |
281 |
<hr /> |
| 225 |
</div> |
282 |
</div> |
| 226 |
|
283 |
|
| 227 |
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none"> |
284 |
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none"> |
| 228 |
<h4 style="margin-left:1em;">New enrollment field</h4> |
285 |
<fieldset class="fg"> |
| 229 |
<input type="hidden" name="club_template_enrollment_field_id" value="" /> |
286 |
<legend>New enrollment field</legend> |
| 230 |
<ol class="clearfix"> |
287 |
<input type="hidden" name="club_template_enrollment_field_id" value="" /> |
| 231 |
<li> |
288 |
<div class="fg-row"> |
| 232 |
<label for="club_template_enrollment_field_name">Name:</label> |
289 |
<div class="fg-label"> |
| 233 |
<input type="text" name="club_template_enrollment_field_name" /> |
290 |
<label for="club_template_enrollment_field_name">Name:</label> |
| 234 |
</li> |
291 |
</div> |
|
|
292 |
<div class="fg-input"> |
| 293 |
<input type="text" name="club_template_enrollment_field_name" /> |
| 294 |
</div> |
| 295 |
</div> |
| 235 |
|
296 |
|
| 236 |
<li> |
297 |
<div class="fg-row"> |
| 237 |
<label for="club_template_enrollment_field_description">Description:</label> |
298 |
<div class="fg-label"> |
| 238 |
<input type="text" name="club_template_enrollment_field_description" /> |
299 |
<label for="club_template_enrollment_field_description">Description:</label> |
| 239 |
</li> |
300 |
</div> |
|
|
301 |
<div class="fg-input"> |
| 302 |
<input type="text" name="club_template_enrollment_field_description" /> |
| 303 |
</div> |
| 304 |
</div> |
| 240 |
|
305 |
|
| 241 |
<li> |
306 |
<div class="fg-row"> |
| 242 |
<label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label> |
307 |
<div class="fg-label"> |
| 243 |
<select name="club_template_enrollment_field_authorised_value_category"> |
308 |
<label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label> |
| 244 |
<option value=""></option> |
309 |
</div> |
| 245 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
310 |
<div class="fg-input"> |
| 246 |
</select> |
311 |
<select name="club_template_enrollment_field_authorised_value_category"> |
| 247 |
</li> |
312 |
<option value="">None</option> |
| 248 |
</ol> |
313 |
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %] |
| 249 |
<fieldset class="action" |
314 |
</select> |
| 250 |
><a href="#" class="delete_enrollment_field"><i class="fa fa-trash-can"></i> Delete field</a></fieldset |
315 |
</div> |
| 251 |
> |
316 |
</div> |
|
|
317 |
</fieldset> |
| 318 |
<fieldset class="action"> |
| 319 |
<a href="#" class="delete_enrollment_field"><i class="fa fa-trash-can"></i> Delete field</a> |
| 320 |
</fieldset> |
| 321 |
<hr /> |
| 252 |
</div> |
322 |
</div> |
| 253 |
|
323 |
|
| 254 |
[% MACRO jsinclude BLOCK %] |
324 |
[% MACRO jsinclude BLOCK %] |
| 255 |
- |
|
|