Bugzilla – Attachment 74376 Details for
Bug 18327
Add the ability to set the received date to today on multi receiving serials
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18327: Same change for serials-edit
Bug-18327-Same-change-for-serials-edit.patch (text/plain), 7.71 KB, created by
Jonathan Druart
on 2018-04-17 18:12:53 UTC
(
hide
)
Description:
Bug 18327: Same change for serials-edit
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-04-17 18:12:53 UTC
Size:
7.71 KB
patch
obsolete
>From 5e705aa56ebd6b54f406dd15de6fc4c094d4fcdc Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 17 Apr 2018 09:42:08 -0300 >Subject: [PATCH] Bug 18327: Same change for serials-edit > >And use an include file to avoid copy/paste >--- > .../en/includes/modals/serials_multi_receiving.inc | 32 +++++++++++++++++++++ > .../prog/en/modules/serials/serials-collection.tt | 33 +--------------------- > .../prog/en/modules/serials/serials-edit.tt | 21 ++++++++------ > serials/serials-edit.pl | 1 + > 4 files changed, 47 insertions(+), 40 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_multi_receiving.inc > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_multi_receiving.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_multi_receiving.inc >new file mode 100644 >index 0000000000..91f9377f24 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_multi_receiving.inc >@@ -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> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >index 7f26f8b867..c2122f7351 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt >@@ -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' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index e23d35d0d7..0821f43258 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -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> > >diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl >index 090e2d3194..e5f69e8192 100755 >--- a/serials/serials-edit.pl >+++ b/serials/serials-edit.pl >@@ -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'}, >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18327
:
74375
|
74376
|
74390
|
74391
|
74456
|
74457
|
74513
|
74514
|
74515
|
74516
|
74535