2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron clubs ›
6 Modify club template [% club_template.name %]
8 Create a new club template
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style type="text/css">
15 border-top: 1px solid #DDD;
20 <body id="clubs_templates_add_modify" class="clubs">
21 [% INCLUDE 'header.inc' %]
22 [% 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 [% IF club_template %]
25 Modify club template <i>[% club_template.name %]</i>
27 Create a new club template
31 <div id="doc" class="yui-t7">
33 <div class="yui-main">
34 <form method="post" class="validated">
35 <input type="hidden" name="id" value="[% club_template.id %]" />
38 [% IF club_template %]
39 Modify club template <i>[% club_template.name %]</i>
41 Create a new club template
46 <fieldset class="rows">
49 <label class="required" for="name">Name:</label>
50 <input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required"/>
51 <span class="required">Required</span>
55 <label for="description">Description:</label>
56 <input id="club-template-description" name="description" type="text" value="[% club_template.description %]" />
60 <label for="is_enrollable_from_opac">Allow public enrollment:</label>
61 [% IF club_template.is_enrollable_from_opac %]
62 <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" />
66 <span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span>
70 <label for="is_email_required">Require valid email address:</label>
71 [% IF club_template.is_email_required %]
72 <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" />
76 <span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span>
80 <label for="branchcode">Library:</label>
81 <select name="branchcode" id="club-template-branchcode">
82 <option value=""></option>
83 [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
85 <div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div>
91 <fieldset class="rows">
92 <legend>Club fields:</legend>
93 <p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p>
94 <div id="club-template-fields">
95 [% FOREACH f IN club_template.club_template_fields %]
96 <div class="club-field">
98 <input type="hidden" name="club_template_field_id" value="[% f.id %]" />
100 <label for="field-name-[% f.id %]">Name:</label>
101 <input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" />
105 <label for="field-description-[% f.id %]">Description:</label>
106 <input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" />
110 <label for="field-description-[% f.id %]">Authorised value category:</label>
111 <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]">
112 <option value=""></option>
113 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
118 <label for="field-delete-[% f.id %]">Delete field:</label>
119 <input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" />
125 <fieldset class="action">
126 <a href="#" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;">
127 <i class="fa fa-plus"></i> Add new field
132 <fieldset class="rows">
133 <legend>Enrollment fields</legend>
134 <p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p>
135 <div id="club-template-enrollment-fields">
136 [% FOREACH f IN club_template.club_template_enrollment_fields %]
137 <div class="enrollment-field">
138 <ol class="clearfix">
140 <span class="label"> </span>
141 <strong>Enrollment field</strong>
144 <input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" />
145 <label for="enrollment-field-name-[% f.id %]">Name:</label>
146 <input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" size="40" />
150 <label for="enrollment-field-description-[% f.id %]">Description:</label>
151 <input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" size="40" />
155 <label for="enrollment-field-description-[% f.id %]">Authorised value category:</label>
156 <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]">
157 <option value=""></option>
158 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
163 <label for="enrollment-field-delete-[% f.id %]">Delete field:</label>
164 <input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" />
170 <fieldset class="action">
171 <a href="#" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;">
172 <i class="fa fa-plus"></i> Add new field
177 <fieldset class="action">
178 <input type="hidden" name="id" value="[% club_template.id %]" />
179 <input type="submit" value="Save" />
180 <a href="clubs.pl" class="cancel">Cancel</a>
184 </div> <!-- /#yui-main -->
188 <div id="new-field-template" class="club-field" style="display:none">
189 <h4 style="margin-left:1em;">New club field</h4>
190 <input type="hidden" name="club_template_field_id" value="" />
191 <ol class="clearfix">
194 <label for="club_template_field_name">Name:</label>
195 <input name="club_template_field_name" />
199 <label for="club_template_field_description">Description:</label>
200 <input name="club_template_field_description" />
204 <label for="club_template_field_authorised_value_category">Authorised value category:</label>
205 <select name="club_template_field_authorised_value_category">
206 <option value=""></option>
207 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
211 <fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset>
215 <div id="new-enrollment-field-template" class="enrollment-field" style="display:none">
216 <h4 style="margin-left:1em;">New enrollment field</h4>
217 <input type="hidden" name="club_template_enrollment_field_id" value="" />
218 <ol class="clearfix">
221 <label for="club_template_enrollment_field_name">Name:</label>
222 <input name="club_template_enrollment_field_name" />
226 <label for="club_template_enrollment_field_description">Description:</label>
227 <input name="club_template_enrollment_field_description" />
231 <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
232 <select name="club_template_enrollment_field_authorised_value_category">
233 <option value=""></option>
234 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
238 <fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset>
242 [% INCLUDE 'intranet-bottom.inc' %]