Owen Leonard
878b0d0e0f
This patch removes unnecessary references to AuthorisedValues.GetCategories: SET AuthorisedValuesCategories = AuthorisedValues.GetCategories The AuthorisedValuesCategories variable is not used. To test, apply the patch and go to Tools -> Patron clubs. - If necessary, create a club template with "Allow public enrollment" enabled. - Create a new club. The club creation process should work correctly. - Open a patron account for checkout and confirm that you can enroll the patron in the new club via the "Clubs" tab. - Log in to the OPAC and confirm that you can successfully enroll yourself in the new club via the "Clubs" tab on your patron summary page. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
148 lines
7 KiB
Text
148 lines
7 KiB
Text
[% USE raw %]
|
|
[% USE HtmlTags %]
|
|
[% USE KohaDates %]
|
|
[% USE Branches %]
|
|
[% USE AuthorisedValues %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>
|
|
[% IF club %]
|
|
Modify club [% club.name | html %]
|
|
[% ELSE %]
|
|
Create a new [% club_template.name | html %] club
|
|
[% END %] › Patron clubs › Tools › Koha
|
|
</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="clubs_add_modify" class="clubs">
|
|
[% WRAPPER 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
[% END %]
|
|
|
|
[% WRAPPER 'sub-header.inc' %]
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="/cgi-bin/koha/tools/tools-home.pl">Tools</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
<a href="clubs.pl">Patron clubs</a>
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
[% IF club %]
|
|
<span>Modify club [% club.name | html | $HtmlTags tag="em" %]</span>
|
|
[% ELSE %]
|
|
<span>Create a new [% club_template.name | html | $HtmlTags tag="em" %] club</span>
|
|
[% END %]
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
[% END #/ WRAPPER sub-header.inc %]
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-md-8 col-md-offset-2">
|
|
|
|
<form method="post" class="validated">
|
|
<input type="hidden" name="id" value="[% club.id | html %]" />
|
|
<input type="hidden" name="club_template_id" value="[% club_template.id | html %]" />
|
|
|
|
<fieldset class="rows">
|
|
|
|
<legend>
|
|
<h1>
|
|
[% IF club %]
|
|
<span>Modify club [% club.name | html | $HtmlTags tag="em" %]</span>
|
|
[% ELSE %]
|
|
<span>Create a new [% club_template.name | html | $HtmlTags tag="em" %] club</span>
|
|
[% END %]
|
|
</h1>
|
|
</legend>
|
|
|
|
<ol>
|
|
<li>
|
|
<label class="required" for="club-name">Name:</label>
|
|
<input id="club-name" name="name" type="text" value="[% club.name | html %]" required="required"/>
|
|
<span class="required">Required</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club-template-name">Description:</label>
|
|
<input id="club-template-name" name="description" type="text" value="[% club.description | html %]" size="40" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="from">Start date:</label>
|
|
<input name="date_start" id="from" size="10" class="flatpickr" data-date_to="to" value="[% club.date_start | html %]">
|
|
</li>
|
|
|
|
<li>
|
|
<label for="to">End date:</label>
|
|
<input name="date_end" id="to" size="10" class="flatpickr" value="[% club.date_end | html %]" >
|
|
</li>
|
|
|
|
<li>
|
|
<label for="club-template-branchcode">Library:</label>
|
|
<select name="branchcode" id="club-template-branchcode">
|
|
<option value=""></option>
|
|
[% PROCESS options_for_libraries libraries => Branches.all( selected => club.branch.branchcode ) %]
|
|
</select>
|
|
</li>
|
|
|
|
[% IF club %]
|
|
[% FOREACH f IN club.club_fields %]
|
|
<li>
|
|
<input type="hidden" name="club_template_field_id" value="[% f.club_template_field.id | html %]" />
|
|
<input type="hidden" name="club_field_id" value="[% f.id | html %]" />
|
|
|
|
<label for="club_field_[% f.club_template_field_id | html %]">[% f.club_template_field.name | html %]</label>
|
|
[% IF f.club_template_field.authorised_value_category %]
|
|
<select name="club_field" id="club_field_[% f.club_template_field_id | html %]">
|
|
[% FOREACH a IN AuthorisedValues.Get( f.club_template_field.authorised_value_category ) %]
|
|
[% IF a.authorised_value == f.value %]
|
|
<option value="[% a.authorised_value | html %]" selected="selected">[% a.lib | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
<input type="text" name="club_field" id="club_field_[% f.club_template_field_id | html %]" value="[% f.value | html %]" size="40" />
|
|
[% END %]
|
|
</li>
|
|
[% END %]
|
|
[% ELSE %]
|
|
[% FOREACH f IN club_template.club_template_fields %]
|
|
<li>
|
|
<input type="hidden" name="club_template_field_id" value="[% f.id | html %]" />
|
|
|
|
<label for="club_template_field_[% f.id | html %]">[% f.name | html %]</label>
|
|
[% IF f.authorised_value_category %]
|
|
<select name="club_field" id="club_template_field_[% f.id | html %]">
|
|
[% FOREACH a IN AuthorisedValues.Get( f.authorised_value_category ) %]
|
|
<option value="[% a.authorised_value | html %]">[% a.lib | html %]</option>
|
|
[% END %]
|
|
</select>
|
|
[% ELSE %]
|
|
<input type="text" name="club_field" id="club_template_field_[% f.id | html %]" size="40" />
|
|
[% END %]
|
|
</li>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
</ol>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" class="btn btn-primary" value="Save" />
|
|
<a href="clubs.pl" class="cancel">Cancel</a>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|