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 class="main container-fluid">
33 <div class="col-md-8 col-md-offset-2">
35 <form method="post" class="validated">
36 <input type="hidden" name="id" value="[% club_template.id %]" />
39 [% IF club_template %]
40 Modify club template <i>[% club_template.name %]</i>
42 Create a new club template
47 <fieldset class="rows">
50 <label class="required" for="name">Name:</label>
51 <input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required"/>
52 <span class="required">Required</span>
56 <label for="club-template-description">Description:</label>
57 <input id="club-template-description" name="description" type="text" value="[% club_template.description %]" />
61 <label for="club-template-is-enrollable-from-opac">Allow public enrollment:</label>
62 [% 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" />
65 <input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" />
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>
71 <label for="club-template-is-email-required">Require valid email address:</label>
72 [% IF club_template.is_email_required %]
73 <input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" />
75 <input type="checkbox" id="club-template-is-email-required" name="is_email_required" />
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>
81 <label for="club-template-branchcode">Library:</label>
82 <select name="branchcode" id="club-template-branchcode">
83 <option value=""></option>
84 [% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
86 <div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div>
92 <fieldset class="rows">
93 <legend>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 <div id="club-template-fields">
96 [% FOREACH f IN club_template.club_template_fields %]
97 <div class="club-field">
99 <input type="hidden" name="club_template_field_id" value="[% f.id %]" />
101 <label for="field-name-[% f.id %]">Name:</label>
102 <input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" />
106 <label for="field-description-[% f.id %]">Description:</label>
107 <input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" />
111 <label for="field-authorised-value-category-[% f.id %]">Authorised value category:</label>
112 <select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]">
113 <option value=""></option>
114 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
119 <label for="field-delete-[% f.id %]">Delete field:</label>
120 <input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" />
126 <fieldset class="action">
127 <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
133 <fieldset class="rows">
134 <legend>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 <div id="club-template-enrollment-fields">
137 [% FOREACH f IN club_template.club_template_enrollment_fields %]
138 <div class="enrollment-field">
139 <ol class="clearfix">
141 <span class="label"> </span>
142 <strong>Enrollment field</strong>
145 <input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" />
146 <label for="enrollment-field-name-[% f.id %]">Name:</label>
147 <input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" size="40" />
151 <label for="enrollment-field-description-[% f.id %]">Description:</label>
152 <input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" size="40" />
156 <label for="enrollment-field-authorised-value-category-[% f.id %]">Authorised value category:</label>
157 <select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]">
158 <option value=""></option>
159 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
164 <label for="enrollment-field-delete-[% f.id %]">Delete field:</label>
165 <input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" />
171 <fieldset class="action">
172 <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
178 <fieldset class="action">
179 <input type="hidden" name="id" value="[% club_template.id %]" />
180 <input type="submit" value="Save" />
181 <a href="clubs.pl" class="cancel">Cancel</a>
185 </div> <!-- /.col-md-8 .col-md-offset-2 -->
186 </div> <!-- /.row -->
189 <div id="new-field-template" class="club-field" style="display:none">
190 <h4 style="margin-left:1em;">New club field</h4>
191 <input type="hidden" name="club_template_field_id" value="" />
192 <ol class="clearfix">
195 <label for="club_template_field_name">Name:</label>
196 <input name="club_template_field_name" />
200 <label for="club_template_field_description">Description:</label>
201 <input name="club_template_field_description" />
205 <label for="club_template_field_authorised_value_category">Authorised value category:</label>
206 <select name="club_template_field_authorised_value_category">
207 <option value=""></option>
208 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
212 <fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset>
216 <div id="new-enrollment-field-template" class="enrollment-field" style="display:none">
217 <h4 style="margin-left:1em;">New enrollment field</h4>
218 <input type="hidden" name="club_template_enrollment_field_id" value="" />
219 <ol class="clearfix">
222 <label for="club_template_enrollment_field_name">Name:</label>
223 <input name="club_template_enrollment_field_name" />
227 <label for="club_template_enrollment_field_description">Description:</label>
228 <input name="club_template_enrollment_field_description" />
232 <label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
233 <select name="club_template_enrollment_field_authorised_value_category">
234 <option value=""></option>
235 [% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
239 <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' %]