return false;
}
[% END %]
- if($("#frequency").val().length == 0){
- alert(_("You must choose a frequency"));
- return false;
- }
- if($("input[name='startdate']").val().length == 0){
- alert(_("You must choose a start date"));
- return false;
- }
if($("#sublength").val().length == 0 && $("input[name='enddate']").val().length == 0){
alert(_("You must choose a subscription length or an end date."));
return false;
}
- if($("#numberpattern").val().length == 0){
- alert(_("You must choose a numbering pattern"));
- return false;
- }
if(advancedpatternlocked == 0){
alert(_("You have modified the advanced prediction pattern. Please save your work or cancel modifications."));
return false;
$.getJSON("subscription-frequency.pl",{"frequency_id":document.f.frequency.value,ajax:'true'},
function(freqdata){
globalfreqdata=freqdata;
- if ( globalfreqdata.unit.length == 0 ) {
+ if ( globalfreqdata.unit && globalfreqdata.unit.length == 0 ) {
var option = $("#subtype option[value='issues']");
$(option).attr('selected', 'selected');
$("#subtype option[value!='issues']").attr('disabled', 'disabled')
var error = 0;
var error_msg = "";
if(frequencyid == undefined || frequencyid == ""){
- error_msg += _("- Frequency is not defined\n");
+ error_msg += _("- Frequency is not defined") + "\n";
error ++;
}
acquidate = $("#acqui_date").val();
if(acquidate == undefined || acquidate == ""){
- error_msg += _("- First publication date is not defined\n");
+ error_msg += _("- First publication date is not defined") + "\n";
error ++;
}
[% IF (more_than_one_serial) %]
var nextacquidate = $("#nextacquidate").val();
if(nextacquidate == undefined || nextacquidate == ""){
- error_msg += _("- Next issue publication date is not defined\n");
+ error_msg += _("- Next issue publication date is not defined") + "\n";
error ++;
}
[% END %]
if(error){
- alert(_("Cannot test prediction pattern for the following reason(s):\n\n")
- + error_msg);
+ alert(_("Cannot test prediction pattern for the following reason(s): %s").format(error_msg));
return false;
}
var cnfrm = 1;
if(found){
var msg = _("This pattern name already exists. Do you want to modify it?")
- + "\n" + _("Warning: it will modify the pattern for all subscriptions")
- + _("that are using it.");
+ + "\n" + _("Warning: it will modify the pattern for all subscriptions that are using it.");
cnfrm = confirm(msg);
}
<div id="bd">
<div class="yui-g">
<h1>[% IF ( modify ) %] Modify subscription for <i>[% bibliotitle |html %]</i>[% ELSE %]Add a new subscription[% END %] (<span id="page_number">1/2</span>)</h1>
- <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl">
+ <form method="post" name="f" action="/cgi-bin/koha/serials/subscription-add.pl" class="validated" onsubmit="return Check_page2();" >
[% IF ( modify ) %]
<input type="hidden" name="op" value="modsubscription" />
<input type="hidden" name="subscriptionid" value="[% subscriptionid %]" />
<input type="text" name="aqbooksellerid" id="aqbooksellerid" value="[% aqbooksellerid %]" size="8" /> (<input type="text" name="aqbooksellername" value="[% aqbooksellername %]" disabled="disabled" readonly="readonly" />) <a href="#" onclick="FindAcqui(f)">Search for a vendor</a>
</li>
<li>
- <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Biblio:</label>
+ <label for="biblionumber" class="required" title="Subscriptions must be associated with a bibliographic record">Record:</label>
<input type="text" name="biblionumber" id="biblionumber" value="[% bibnum %]" size="8" />
(<input type="text" name="title" value="[% bibliotitle %]" disabled="disabled" readonly="readonly" />) <span class="required" title="Subscriptions must be associated with a bibliographic record">Required</span>
- <div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for Biblio</a>
+ <div class="inputnote"> <a href="#" onclick="Plugin(f)">Search for record</a>
[% IF ( CAN_user_editcatalogue ) %]
[% IF ( modify ) %]
- | <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit biblio</a>
+ | <a href="#" onclick="addbiblioPopup([% bibnum %]); return false;">Edit record</a>
[% ELSE %]
- | <a href="#" onclick="addbiblioPopup(); return false;">Create Biblio</a>
+ | <a href="#" onclick="addbiblioPopup(); return false;">Create record</a>
[% END %]
[% END %]
</div>
<li>
<label for="branchcode">Library:</label>
<select name="branchcode" id="branchcode" style="width: 20em;">
- [% UNLESS ( Independantbranches ) %]
+ [% UNLESS ( Independentbranches ) %]
<option value="">None</option>
[% END %]
[% FOREACH branchloo IN branchloop %]
[% END %]
[% END %]
</select>
- <div class="hint">Select a notice and patrons on the routing list will be notified when new issues are received.</div>
+ <div class="hint">Selecting a notice will allow patrons to subscribe to notifications when a new issue is received.</div>
[% ELSE %]
<span class="label">Patron notification: </span>
<div class="hint">To notify patrons of new serial issues, you must <a href="/cgi-bin/koha/tools/letter.pl">define a notice</a>.</div>
<legend>Serials planning</legend>
<ol>
<li>
- <label for="firstacquidate">First issue publication date: (*)</label>
+ <label for="firstacquidate" class="required">First issue publication date:</label>
[% UNLESS (more_than_one_serial) %]
- <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker" readonly="readonly"/>
+ <input type="text" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]" class="datepicker required" required="required" />
[% ELSE %]
[% firstacquidate | $KohaDates %]
<input type="hidden" size="10" id="acqui_date" name="firstacquidate" value="[% firstacquidate | $KohaDates %]"/>
[% IF (more_than_one_serial) %]
<li>
<label for="nextacquidate">Next issue publication date:</label>
- <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" readonly="readonly"/>
+ <input type="text" size="10" id="nextacquidate" name="nextacquidate" value="[% nextacquidate | $KohaDates %]" class="datepicker" />
</li>
[% END %]
<li>
- <label for="frequency">Frequency: (*)</label>
- <select name="frequency" size="1" id="frequency">
+ <label for="frequency" class="required">Frequency:</label>
+ <select name="frequency" size="1" id="frequency" class="required" required="required">
<option value="">-- please choose --</option>
[% FOREACH frequency IN frequencies %]
- <option value="[% frequency.id %]" [% IF (frequency.selected) %] selected="selected" [% END %]>
+ [% IF (frequency.selected) %]
+ <option value="[% frequency.id %]" selected="selected">
+ [% ELSE %]
+ <option value="[% frequency.id %]">
+ [% END %]
[% frequency.label %]
</option>
[% END %]
<label for="subtype">Subscription length:</label>
<select name="subtype" id="subtype">
[% FOREACH subt IN subtype %]
- <option value="[% subt.name %]" [% IF (subt.selected) %] selected="selected" [% END %] >
+ [% IF (subt.selected) %]
+ <option value="[% subt.name %]" selected="selected">
+ [% ELSE %]
+ <option value="[% subt.name %]">
+ [% END %]
[% subt.name %]
</option>
[% END %]
<input type="hidden" name="issuelengthcount">
</li>
<li>
- <label for="startdate"> Subscription start date: (*)</label>
- <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom" readonly="readonly"/>
+ <label for="startdate" class="required"> Subscription start date:</label>
+ <input type="text" size="10" id="from" name="startdate" value="[% startdate | $KohaDates %]" class="datepickerfrom required" required="required" />
</li>
<li>
<label for="enddate">Subscription end date:</label>
- <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" readonly="readonly"/>
+ <input type="text" size="10" id="to" name="enddate" value="[% enddate | $KohaDates %]" class="datepickerto" />
</li>
<li>
- <label for="numberpattern">Numbering pattern:</label>
- <select name="numbering_pattern" size="1" id="numberpattern">
+ <label for="numberpattern" class="required">Numbering pattern:</label>
+ <select name="numbering_pattern" size="1" id="numberpattern" class="required" required="required">
<option value="">-- please choose --</option>
[% FOREACH numberpattern IN numberpatterns %]
- <option value="[% numberpattern.id %]" [% IF (numberpattern.selected) %] selected="selected" [% END %]>[% numberpattern.label %]</option>
+ [% IF (numberpattern.selected) %]
+ <option value="[% numberpattern.id %]" selected="selected">
+ [% ELSE %]
+ <option value="[% numberpattern.id %]">
+ [% END %]
+ [% numberpattern.label %]
+ </option>
[% END %]
</select>
</li>
<label for="locale">Locale</label>
<select id="locale" name="locale">
<option value=""></option>
- [% FOREACH locale IN locales %]
- <option value="[% locale %]">
- [% locale %]
- </option>
+ [% FOREACH l IN locales %]
+ [% IF l.language == locale %]
+ <option value="[% l.language %]" selected="selected">[% l.description %]</option>
+ [% ELSE %]
+ <option value="[% l.language %]">[% l.description %]</option>
+ [% END %]
[% END %]
</select>
- <span class="hint">If empty, system locale is used</span>
+ <span class="hint">If empty, English is used</span>
</li>
<li id="more_options">
<table id="moreoptionst">
<li><a style="cursor:pointer" onclick="toggleAdvancedPattern();">Show/Hide advanced pattern</a></li>
<div id="advancedpredictionpattern" style="display:none">
<li>
- <label for="patternname">Pattern name: (*)</label>
- <input id="patternname" name="patternname" type="text" readonly="readonly" />
+ <label for="patternname" class="required">Pattern name:</label>
+ <input id="patternname" name="patternname" type="text" readonly="readonly" class="required" required="required" />
</li>
<li>
<label for="numberingmethod">Numbering formula:</label>
<fieldset class="action">
<input type="button" value="<< Previous" onclick="show_page_1();" style="float:left;"/>
<input id="testpatternbutton" type="button" value="Test prediction pattern" onclick="testPredictionPattern();" />
- <input type="button" value="Save subscription" onclick="if (Check_page2()) submit();" style="float:right;" accesskey="w" />
+ <input type="submit" value="Save subscription" style="float:right;" accesskey="w" />
</fieldset>
</div>
</div>