Marcel de Rooy
1b96a5f588
Found another one on a visible input. Replaced with html filter. koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep2.tt: <input type="text" class="enrolmentperioddate" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | $KohaDates %]" /> But we also have a few hidden ones. First verified that cleanborrowers did not work anymore with expirydate. Fixed it with passing iso dateformat to resolve. intranet-tmpl/prog/en/modules/acqui/parcels.tt: <input type="hidden" name="shipmentdate" value="[% shipmentdate | $KohaDates %]" /> intranet-tmpl/prog/en/modules/serials/subscription-add.tt: <input type="hidden" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/> intranet-tmpl/prog/en/modules/tools/batch_extend_due_dates.tt: <input type="hidden" name="new_hard_due_date" value="[% new_hard_due_date | $KohaDates %]" /> intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt: <input type="hidden" name="not_borrowed_since" value="[% not_borrowed_since | $KohaDates %]" /> intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt: <input type="hidden" name="last_issue_date" value="[% last_issue_date | $KohaDates %]" /> intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt: <input type="hidden" name="borrower_dateexpiry" value="[% borrower_dateexpiry | $KohaDates %]" /> intranet-tmpl/prog/en/modules/tools/cleanborrowers.tt: <input type="hidden" name="borrower_lastseen" value="[% borrower_lastseen | $KohaDates %]" /> Test plan: Try cleanborrowers with expiry date. cd koha-tmpl; git grep "<input.*\$KohaDates" | grep -v iso Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
150 lines
9.3 KiB
Text
150 lines
9.3 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Add a patron category › Web installer › Koha</title>
|
|
[%# The following if statement checks if the categories variable handed to this template %]
|
|
[%# by onboarding.pl has data in it. If the categories variable does have data %]
|
|
[%# in it this means that the user has previously imported sample patron category %]
|
|
[%# data and so we do not need to show them the create patron category screen 1, %]
|
|
[%#instead we can display a screen with ubtton redirecting the user to step 3 %]
|
|
[% IF (categories && categories.count > 1 ) %]
|
|
<meta http-equiv="refresh" content="0; url=/cgi-bin/koha/installer/onboarding.pl?step=3">
|
|
[% END %]
|
|
[% INCLUDE 'installer-doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="installer" class="installer">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div id="onboarding-step2" class="installer-main col-sm-8 col-sm-offset-2 col-md-8 col-md-offset-2">
|
|
<div id="logo"><a href="#">Koha</a></div>
|
|
|
|
<h1>Web installer › Create a patron category</h1>
|
|
|
|
[% INCLUDE 'onboarding_messages.inc' %]
|
|
|
|
<div id="steps">
|
|
<ol>
|
|
<li class="complete"><i class="fa fa-check-square-o" aria-hidden="true"></i> Installation</li>
|
|
<li class="current open"><i class="fa fa-square-o" aria-hidden="true"></i> Onboarding
|
|
<ol>
|
|
<li class="complete"><i class="fa fa-check-square-o" aria-hidden="true"></i> Create a library</li>
|
|
<li class="current open"><i class="fa fa-square-o" aria-hidden="true"></i> Create a patron category</li>
|
|
<li class="open"><i class="fa fa-square-o" aria-hidden="true"></i> Create Koha administrator patron</li>
|
|
<li class="open"><i class="fa fa-square-o" aria-hidden="true"></i> Create a new item type</li>
|
|
<li class="open"><i class="fa fa-square-o" aria-hidden="true"></i> Create a new circulation rule</li>
|
|
</ol>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<p> The patron category you create will be used by the <span class="bg-info">administrator account</span>.</p>
|
|
|
|
<form id="category_form" method="post" action="onboarding.pl">
|
|
<fieldset class="rows">
|
|
<input type="hidden" name="step" value="2" />
|
|
<input type="hidden" name="op" value="add_validate_category" />
|
|
<ol>
|
|
<li>
|
|
<label for="categorycode" class="required">Category code: </label>
|
|
<input type="text" pattern="[0-9A-Za-z]{1,10}" id="categorycode" name="categorycode" value="[% category.categorycode | html %]" size="10" maxlength="10" class="required" required="required" />
|
|
<span class="required">Required</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="description" class="required">Description: </label>
|
|
<input type="text" id="description" name="description" size="40" maxlength="80" class="required" required="required" value="[% category.description | html %]" />
|
|
<span class="required">Required</span>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="overduenoticerequired">Overdue notice required: </label>
|
|
<select name="overduenoticerequired" id="overduenoticerequired">
|
|
[% IF category.overduenoticerequired %]
|
|
<option value="0">No</option>
|
|
<option value="1" selected="selected">Yes</option>
|
|
[% ELSE %]
|
|
<option value="0" selected="selected">No</option>
|
|
<option value="1">Yes</option>
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
|
|
<li>
|
|
<span class="label">Category type: </span>
|
|
<input type="hidden" name="category_type" value="S" />
|
|
Staff
|
|
</li>
|
|
|
|
<li>
|
|
<label for="default_privacy">Default privacy: </label>
|
|
<select id="default_privacy" name="default_privacy" required="required">
|
|
[% SET default_privacy = 'default' %]
|
|
|
|
[% IF category %]
|
|
[% SET default_privacy = category.default_privacy %]
|
|
[% END %]
|
|
|
|
[% SWITCH default_privacy %]
|
|
[% CASE 'forever' %]
|
|
<option value="default">Default</option>
|
|
<option value="never">Never</option>
|
|
<option value="forever" selected="selected">Forever</option>
|
|
[% CASE 'never' %]
|
|
<option value="default">Default</option>
|
|
<option value="never" selected="selected">Never</option>
|
|
<option value="forever">Forever</option>
|
|
[% CASE %]
|
|
<option value="default" selected="selected">Default</option>
|
|
<option value="never">Never</option>
|
|
<option value="forever">Forever</option>
|
|
[% END %]
|
|
</select>
|
|
<div class="hint">
|
|
Controls how long a patrons checkout history is kept for new patrons of this category. "Never" anonymizes checkouts on return, and "Forever" keeps a patron's checkout history indefinitely. When set to "Default", the amount of history kept is controlled by the cronjob <code>batch_anonymise.pl</code> which should be set up by your system administrator.
|
|
</div>
|
|
</li>
|
|
<li>
|
|
<span class="label">Enrolment period: </span>
|
|
<fieldset class="rows">
|
|
<ol>
|
|
<li>
|
|
<span class="label"></span><strong>Choose one</strong>
|
|
</li>
|
|
<li>
|
|
<label for="enrolmentperiod">In months: </label>
|
|
[% IF category.enrolmentperiod %]
|
|
<input type="text" inputmode="numeric" pattern="[0-9]*" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" value="[% category.enrolmentperiod | html %]" />
|
|
[% ELSE %]
|
|
<input type="text" inputmode="numeric" pattern="[0-9]*" class="enrolmentperiod" name="enrolmentperiod" id="enrolmentperiod" size="3" value="" />
|
|
[% END %]
|
|
</li>
|
|
<li>
|
|
<label for="enrolmentperioddate">Until date: </label>
|
|
<input type="text" class="enrolmentperioddate" name="enrolmentperioddate" id="enrolmentperioddate" value="[% category.enrolmentperioddate | html %]" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' dateformat = Koha.Preference('dateformat') %]</div>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
</li>
|
|
</ol>
|
|
|
|
<p>
|
|
To add another patron category and for more settings go to:
|
|
<span class="breadcrumbs"> Administration <strong>›</strong> Patron categories</span>
|
|
</p>
|
|
|
|
<input type="submit" class="btn btn-primary" value="Submit" />
|
|
</fieldset>
|
|
</form>
|
|
</div> <!-- / #onboarding-step2 -->
|
|
</div> <!-- / .row -->
|
|
</div><!-- / .container-fluid -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'validator-strings.inc' %]
|
|
[% INCLUDE 'installer-strings.inc' %]
|
|
<script src="[% interface | html %]/[% theme | html %]/js/onboarding.js"></script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'installer-intranet-bottom.inc' %]
|