Bug 37294: Add modal to generate next
To test:
1. Serials -> Create or find a subscription
2. Receive the subscription
3. Save
4. Click 'Generate next'
5. Nothing happens
6. APPLY PATCH
7. Try again, now the "Generate next" button should work as expected.
Signed-off-by: Kelly <kelly@bywatersoutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 56cbc1f092)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
1b90c3dc65
commit
8e1ab9522f
|
|
@ -0,0 +1,21 @@
|
|||
<div id="generate_next" class="modal" tabindex="-1" role="dialog" aria-labelledby="generate_next" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form action="/cgi-bin/koha/serials/serials-collection.pl" method="post">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<div class="modal-body">
|
||||
<fieldset class="rows">
|
||||
<legend>Do you really want to generate next serial?</legend>
|
||||
<input type="hidden" name="op" value="cud-gennext" />
|
||||
<input type="hidden" name="subscriptionid" value="[% subscriptionidlist || subscriptionid | html %]" />
|
||||
</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="Yes" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -39,6 +39,9 @@
|
|||
|
||||
[% INCLUDE 'modals/serials_skip_issues.inc' %]
|
||||
|
||||
[% INCLUDE 'modals/generate_next.inc' %]
|
||||
|
||||
|
||||
[% UNLESS ( popup ) %]
|
||||
[% INCLUDE 'serials-toolbar.inc' %]
|
||||
|
||||
|
|
@ -182,7 +185,7 @@
|
|||
<div class="btn-group"><input type="submit" value="Edit serials" class="btn btn-primary btn-sm" /></div>
|
||||
[% UNLESS subscription.closed %]
|
||||
<div class="btn-group">
|
||||
<input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" class="btn btn-default btn-sm generatenext" />
|
||||
<input type="button" value="Generate next" data-subscriptionid="[% subscriptionidlist | html %]" href="#generate_next" class="btn btn-default btn-sm" data-toggle="modal" />
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<input type="button" value="Skip issues and generate next" data-subscriptionid="[% subscriptionidlist | html %]" href="#skip_issues" class="btn btn-default btn-sm" data-toggle="modal" />
|
||||
|
|
@ -352,12 +355,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
function generateNext(subscriptionid) {
|
||||
if(confirm(_("Do you really want to generate next serial?"))){
|
||||
document.location = 'serials-collection.pl?op=gennext&subscriptionid='+subscriptionid;
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
if( $("#subscription_years .tab-pane.active").length < 1 ){
|
||||
$("#subscription_years a:first").tab("show");
|
||||
|
|
|
|||
Loading…
Reference in New Issue