Owen Leonard
693dde521d
This patch addresses template issues with the newly-added patron clubs pages. - Move Clubs tab out of second position in Circulation page tabs. - Link patron name in enrollments list to the patron record - Make page titles on some pages more specific - Correct label "for" attributes so that it matches input id - Correst style of buttons: Buttons in tables must be "btn-xs," all Bootstrap buttons must have "btn-default." - Correct "Edit" icons: Should be "fa-pencil" This patch also revises the club template editing form to make it more consistent with similar interfaces in Koha and (hopefully) make it more clear. To test, apply the patch and test adding clubs and club templates and enrolling patrons in clubs via the staff client and OPAC. Confirm that everything looks and work okay. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
242 lines
12 KiB
Text
242 lines
12 KiB
Text
[% USE Branches %]
|
|
[% USE AuthorisedValues %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Tools › Patron clubs ›
|
|
[% IF club_template %]
|
|
Modify club template [% club_template.name %]
|
|
[% ELSE %]
|
|
Create a new club template
|
|
[% END %]
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style type="text/css">
|
|
.club-field,
|
|
.enrollment-field {
|
|
border-top: 1px solid #DDD;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body id="clubs_templates_add_modify" class="clubs">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
<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> ›
|
|
[% IF club_template %]
|
|
Modify club template <i>[% club_template.name %]</i>
|
|
[% ELSE %]
|
|
Create a new club template
|
|
[% END %]
|
|
</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
<div id="bd">
|
|
<div class="yui-main">
|
|
<form method="post" class="validated">
|
|
<input type="hidden" name="id" value="[% club_template.id %]" />
|
|
|
|
<h2>
|
|
[% IF club_template %]
|
|
Modify club template <i>[% club_template.name %]</i>
|
|
[% ELSE %]
|
|
Create a new club template
|
|
[% END %]
|
|
</h2>
|
|
|
|
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<label class="required" for="name">Name:</label>
|
|
<input id="club-template-name" name="name" type="text" value="[% club_template.name %]" required="required"/>
|
|
<span class="required">Required</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="description">Description:</label>
|
|
<input id="club-template-description" name="description" type="text" value="[% club_template.description %]" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="is_enrollable_from_opac">Allow public enrollment:</label>
|
|
[% IF club_template.is_enrollable_from_opac %]
|
|
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" id="club-template-is-enrollable-from-opac" name="is_enrollable_from_opac" />
|
|
[% END %]
|
|
<span class="hint">If a template allows public enrollment, patrons can enroll in a club based on this template from the public catalog.</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="is_email_required">Require valid email address:</label>
|
|
[% IF club_template.is_email_required %]
|
|
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" checked="checked" />
|
|
[% ELSE %]
|
|
<input type="checkbox" id="club-template-is-email-required" name="is_email_required" />
|
|
[% END %]
|
|
<span class="hint">If set, a club based on this template can only be enrolled in by patrons with a valid email address.</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="branchcode">Library:</label>
|
|
<select name="branchcode" id="club-template-branchcode">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => club_template.branchcode ) %]
|
|
</select>
|
|
<div class="hint">If set, only librarians logged in with this branch will be able to modify this club template.</div>
|
|
</li>
|
|
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="rows">
|
|
<legend>Club fields:</legend>
|
|
<p><span class="hint">These fields will be used in the creation of clubs based on this template</span></p>
|
|
<div id="club-template-fields">
|
|
[% FOREACH f IN club_template.club_template_fields %]
|
|
<div class="club-field">
|
|
<ol class="clearfix">
|
|
<input type="hidden" name="club_template_field_id" value="[% f.id %]" />
|
|
<li>
|
|
<label for="field-name-[% f.id %]">Name:</label>
|
|
<input name="club_template_field_name" id="field-name-[% f.id %]" value="[% f.name %]" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="field-description-[% f.id %]">Description:</label>
|
|
<input name="club_template_field_description" id="field-description-[% f.id %]" value="[% f.description %]" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="field-description-[% f.id %]">Authorised value category:</label>
|
|
<select name="club_template_field_authorised_value_category" id="field-authorised-value-category-[% f.id %]">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="field-delete-[% f.id %]">Delete field:</label>
|
|
<input type="checkbox" name="club_template_field_delete" id="field-delete-[% f.id %]" value="[% f.id %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
<fieldset class="action">
|
|
<a href="#" onclick="$('#new-field-template').clone().attr('id','').show().appendTo('#club-template-fields'); return false;">
|
|
<i class="fa fa-plus"></i> Add new field
|
|
</a>
|
|
</fieldset>
|
|
</fieldset>
|
|
|
|
<fieldset class="rows">
|
|
<legend>Enrollment fields</legend>
|
|
<p><span class="hint">These fields will be used when enrolling a patron in a club based on this template</span></p>
|
|
<div id="club-template-enrollment-fields">
|
|
[% FOREACH f IN club_template.club_template_enrollment_fields %]
|
|
<div class="enrollment-field">
|
|
<ol class="clearfix">
|
|
<li>
|
|
<span class="label"> </span>
|
|
<strong>Enrollment field</strong>
|
|
</li>
|
|
<li>
|
|
<input type="hidden" name="club_template_enrollment_field_id" value="[% f.id %]" />
|
|
<label for="enrollment-field-name-[% f.id %]">Name:</label>
|
|
<input name="club_template_enrollment_field_name" id="enrollment-field-name-[% f.id %]" value="[% f.name %]" size="40" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="enrollment-field-description-[% f.id %]">Description:</label>
|
|
<input name="club_template_enrollment_field_description" id="enrollment-field-description-[% f.id %]" value="[% f.description %]" size="40" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="enrollment-field-description-[% f.id %]">Authorised value category:</label>
|
|
<select name="club_template_enrollment_field_authorised_value_category" id="enrollment-field-authorised-value-category-[% f.id %]">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories( selected => f.authorised_value_category) %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="enrollment-field-delete-[% f.id %]">Delete field:</label>
|
|
<input type="checkbox" name="club_template_enrollment_field_delete" id="enrollment-field-delete-[% f.id %]" value="[% f.id %]" />
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
<fieldset class="action">
|
|
<a href="#" onclick="$('#new-enrollment-field-template').clone().attr('id','').show().appendTo('#club-template-enrollment-fields'); return false;">
|
|
<i class="fa fa-plus"></i> Add new field
|
|
</a>
|
|
</fieldset>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="hidden" name="id" value="[% club_template.id %]" />
|
|
<input type="submit" value="Save" />
|
|
<a href="clubs.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
|
|
</div> <!-- /#yui-main -->
|
|
</div> <!-- /#bd -->
|
|
|
|
|
|
<div id="new-field-template" class="club-field" style="display:none">
|
|
<h4 style="margin-left:1em;">New club field</h4>
|
|
<input type="hidden" name="club_template_field_id" value="" />
|
|
<ol class="clearfix">
|
|
|
|
<li>
|
|
<label for="club_template_field_name">Name:</label>
|
|
<input name="club_template_field_name" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club_template_field_description">Description:</label>
|
|
<input name="club_template_field_description" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club_template_field_authorised_value_category">Authorised value category:</label>
|
|
<select name="club_template_field_authorised_value_category">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset>
|
|
<hr/>
|
|
</div>
|
|
|
|
<div id="new-enrollment-field-template" class="enrollment-field" style="display:none">
|
|
<h4 style="margin-left:1em;">New enrollment field</h4>
|
|
<input type="hidden" name="club_template_enrollment_field_id" value="" />
|
|
<ol class="clearfix">
|
|
|
|
<li>
|
|
<label for="club_template_enrollment_field_name">Name:</label>
|
|
<input name="club_template_enrollment_field_name" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club_template_enrollment_field_description">Description:</label>
|
|
<input name="club_template_enrollment_field_description" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club_template_enrollment_field_authorised_value_category">Authorised value category:</label>
|
|
<select name="club_template_enrollment_field_authorised_value_category">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_authorised_value_categories authorised_value_categories => AuthorisedValues.GetCategories() %]
|
|
</select>
|
|
</li>
|
|
</ol>
|
|
<fieldset class="action"><a href="#" onclick="$(this).parent().parent().remove(); return false;"><i class="fa fa-trash"></i> Delete field</a></fieldset>
|
|
</div>
|
|
</div>
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|