2 [% USE AuthorisedValues %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Tools › Patron clubs › Club template</title>
5 [% INCLUDE 'doc-head-close.inc' %]
8 <body id="clubs_templates_add_modify" class="clubs">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'cat-search.inc' %]
11 <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> › Add / modify club template</div>
14 <div class="yui-main">
15 <form method="post" class="validated">
16 <input type="hidden" name="id" value="[% club_template.id %]" />
18 <fieldset class="rows">
21 [% IF club_template %]
22 Modify club template <i>[% club_template.name %]</i>
24 Create a new club template
30 <label class="required" for="name">Name:</label>
31 <input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required"/>
32 <span class="required">Required</span>
36 <label for="description">Description:</label>
37 <input id="club-template-description" name="description" type="text" value="[% club_template.description %]" />
41 <label for="is_enrollable_from_opac">Allow public enrollment:</label>
42 [% IF club_template.is_enrollable_from_opac %]
43 <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" />
45 <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" />
47 <span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span>
51 <label for="is_email_required">Require valid email address:</label>
52 [% IF club_template.is_email_required %]
53 <input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" />
55 <input type="checkbox" id="club-template-is-email-required" name="is_email_required" />
57 <span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span>
61 <label for="branchcode">Library:</label>
62 <select name="branchcode" id="club-template-branchcode">
63 <option value=""> </option>
64 [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
66 <span class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</span>
72 <p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p>
73 <span id="club-template-fields">
74 [% FOREACH f IN club_template.club_template_fields %]
76 <input type="hidden" name="club_template_field_id" value="[% f.id %]" />
78 <label for="field-name-[% f.id %]">Name:</label>
79 <input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" />
83 <label for="field-description-[% f.id %]">Description:</label>
84 <input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" />
88 <label for="field-description-[% f.id %]">Authorised value category:</label>
89 <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]">
90 <option value=""> </option>
91 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
96 <label for="field-delete-[% f.id %]">Delete field:</label>
97 <input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" />
104 <div class="btn-toolbar">
105 <a href="#" class="btn btn-default" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;">
106 <i class="fa fa-plus"></i> Add new field
110 <h2>Enrollment fields:</h2>
111 <p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p>
112 <span id="club-template-enrollment-fields">
113 [% FOREACH f IN club_template.club_template_enrollment_fields %]
115 <input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" />
117 <label for="enrollment-field-name-[% f.id %]">Name:</label>
118 <input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" />
122 <label for="enrollment-field-description-[% f.id %]">Description:</label>
123 <input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" />
127 <label for="enrollment-field-description-[% f.id %]">Authorised value category:</label>
128 <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]">
129 <option value=""> </option>
130 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
135 <label for="enrollment-field-delete-[% f.id %]">Delete field:</label>
136 <input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" />
143 <div class="btn-toolbar">
144 <a href="#" class="btn btn-default" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;">
145 <i class="fa fa-plus"></i> Add new field
151 <fieldset class="action">
152 <input type="hidden" name="id" value="[% club_template.id %]" />
153 <input type="submit" class="btn btn-default" value="Save" />
154 <a href="clubs.pl" class="cancel">Cancel</a>
160 <span id="new-field-template" style="display:none">
162 <input type="hidden" name="club_template_field_id" value="" />
165 <label for="club_template_field_name">Name:</label>
166 <input name="club_template_field_name" />
170 <label for="club_template_field_description">Description:</label>
171 <input name="club_template_field_description" />
175 <label for="club_template_field_authorised_value_category">Authorised value category:</label>
176 <select name="club_template_field_authorised_value_category">
177 <option value=""> </option>
178 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
182 <a href="#" onclick="$(this).parent().remove(); return false;">Cancel</a>
188 <span id="new-enrollment-field-template" style="display:none">
190 <input type="hidden" name="club_template_enrollment_field_id" value="" />
193 <label for="club_template_enrollment_field_name">Name:</label>
194 <input name="club_template_enrollment_field_name" />
198 <label for="club_template_enrollment_field_description">Description:</label>
199 <input name="club_template_enrollment_field_description" />
203 <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
204 <select name="club_template_enrollment_field_authorised_value_category">
205 <option value=""> </option>
206 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
210 <a href="#" onclick="$(this).parent().remove(); return false;">Cancel</a>
216 [% INCLUDE 'intranet-bottom.inc' %]