Bug 18327: Same change for serials-edit
And use an include file to avoid copy/paste Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
d3ed24560c
commit
4aa45fc489
4 changed files with 47 additions and 40 deletions
|
@ -0,0 +1,32 @@
|
|||
<div id="multi_receiving" class="modal" tabindex="-1" role="dialog" aria-labelledby="multi_receiving_label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="/cgi-bin/koha/serials/serials-collection.pl" method="post">
|
||||
<div class="modal-body">
|
||||
<fieldset class="rows">
|
||||
<legend>Multi receiving</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label for="nbissues" class="required">How many issues do you want to receive?</label>
|
||||
<input type="text" size="25" id="nbissues" name="nbissues" required="required" />
|
||||
<li>
|
||||
<li>
|
||||
<label for="date_received_today">Set the date received to today?</label>
|
||||
<input type="checkbox" id="date_received_today" name="date_received_today" />
|
||||
</li>
|
||||
</ol>
|
||||
<input type="hidden" name="op" value="gennext" />
|
||||
|
||||
[%# subscriptionidlist is used from serials-collection, subscriptionid is used from serils-edit %]
|
||||
<input type="hidden" name="subscriptionid" value="[% subscriptionidlist || subscriptionid %]" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
|
||||
<input type="submit" class="btn btn-default approve" value="Multi receiving" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -21,38 +21,7 @@
|
|||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
<!-- Modal -->
|
||||
<div id="multi_receiving" class="modal" tabindex="-1" role="dialog" aria-labelledby="multi_receiving_label" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="/cgi-bin/koha/serials/serials-collection.pl" method="post">
|
||||
<div class="modal-body">
|
||||
<fieldset class="rows">
|
||||
<legend>Multi receiving</legend>
|
||||
<ol>
|
||||
<li>
|
||||
<label for="nbissues" class="required">How many issues do you want to receive?</label>
|
||||
<input type="text" size="25" id="nbissues" name="nbissues" required="required" />
|
||||
<li>
|
||||
<li>
|
||||
<label for="date_received_today">Set the date received to today?</label>
|
||||
<input type="checkbox" id="date_received_today" name="date_received_today" />
|
||||
</li>
|
||||
</ol>
|
||||
<input type="hidden" name="op" value="gennext" />
|
||||
<input type="hidden" name="subscriptionid" value="[% subscriptionidlist %]" />
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
|
||||
<input type="submit" class="btn btn-default approve" value="Multi receiving" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
[% INCLUDE 'modals/serials_multi_receiving.inc' %]
|
||||
|
||||
[% UNLESS ( popup ) %]
|
||||
[% INCLUDE 'serials-toolbar.inc' %]
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
[% INCLUDE 'calendar.inc' %]
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
//<![CDATA[
|
||||
function generateReceive() {
|
||||
var subscriptionid = document.getElementsByName("subscriptionid")[0].value;
|
||||
if(nbissues=prompt(_("How many issues do you want to receive ?"))){
|
||||
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid+'&nbissues='+nbissues;
|
||||
}
|
||||
}
|
||||
$(document).ready(function() {
|
||||
$('#multi_receiving').on('show', function () {
|
||||
$(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML);
|
||||
});
|
||||
});
|
||||
|
||||
function popup(subscriptionid) {
|
||||
window.open("subscription-renew.pl?subscriptionid="+subscriptionid,"subscription_renewal",'width=700,height=400,toolbar=false,scrollbars=yes');
|
||||
}
|
||||
|
@ -91,6 +91,8 @@ $(document).ready(function() {
|
|||
<div id="yui-main">
|
||||
<div class="yui-b">
|
||||
|
||||
[% INCLUDE 'modals/serials_multi_receiving.inc' %]
|
||||
|
||||
<h1>Serial edition <i>[% bibliotitle %]</i>
|
||||
[% IF location %] ([% AuthorisedValues.GetByCode('LOC', location) %])[% END %]
|
||||
[% IF ( callnumber ) %] callnumber: [% callnumber %][% END %]</h1>
|
||||
|
@ -423,8 +425,11 @@ $(document).ready(function() {
|
|||
|
||||
</table>
|
||||
<fieldset class="action">
|
||||
<input type="submit" value="Save" class="button" accesskey="w" />
|
||||
[% UNLESS ( serialsadditems ) %] <input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %]
|
||||
<div class="btn-group"><input type="submit" value="Save" class="btn btn-default btn-sm" accesskey="w" /></div>
|
||||
[% UNLESS ( serialsadditems ) %]
|
||||
<div class="btn-group"><a href="#multi_receiving" role="button" class="btn btn-default btn-sm" data-toggle="modal"><i class="fa fa-plus"></i> Multi receiving</a></div>
|
||||
[% END %]
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
|
|
|
@ -421,6 +421,7 @@ my $location = $serialdatalist[0]->{'location'};
|
|||
my $default_bib_view = get_default_view();
|
||||
|
||||
$template->param(
|
||||
subscriptionid => $serialdatalist[0]->{subscriptionid},
|
||||
serialsadditems => $serialdatalist[0]->{'serialsadditems'},
|
||||
callnumber => $serialdatalist[0]->{'callnumber'},
|
||||
internalnotes => $serialdatalist[0]->{'internalnotes'},
|
||||
|
|
Loading…
Reference in a new issue