Bugzilla – Attachment 151329 Details for
Bug 33748
UI issue on addorderiso2709.pl page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33748: Fix UI issue when importing records from a staged MARC file
Bug-33748-Fix-UI-issue-when-importing-records-from.patch (text/plain), 35.69 KB, created by
Lucas Gass (lukeg)
on 2023-05-16 23:03:17 UTC
(
hide
)
Description:
Bug 33748: Fix UI issue when importing records from a staged MARC file
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2023-05-16 23:03:17 UTC
Size:
35.69 KB
patch
obsolete
>From 57309618e0fb9fda4bddf6e1cb1daf4b80244631 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Tue, 16 May 2023 23:02:38 +0000 >Subject: [PATCH] Bug 33748: Fix UI issue when importing records from a staged > MARC file > >--- > .../prog/en/modules/acqui/addorderiso2709.tt | 252 +++++++++--------- > .../intranet-tmpl/prog/js/addorderiso2709.js | 5 +- > 2 files changed, 130 insertions(+), 127 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >index 04a9096731..ba49b6238f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt >@@ -203,143 +203,143 @@ > <input id="sort2_record_[% biblio.import_record_id | html %]" type="text" size="20" name="sort2" value="[% biblio.sort2 | html %]" /> > </li> > </ol> >- [% IF ( biblio.iteminfos.size ) %] >- <div class="item_edit_form"> >- [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %] >- [% FOREACH item IN biblio.iteminfos %] >- <fieldset> >- <legend>Item record [% item.item_id | html %]</legend> >- <ol> >- <li> >- <label for="homebranch_item_[% item.item_id | html %]">homebranch</label> >- <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% biblio.import_record_id | html %]"> >- [% FOREACH l IN libraries %] >- [% IF l.branchcode == item.homebranch %] >- <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >- [% ELSE %] >- <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >- [% END %] >+ </fieldset> <!-- /.rows.order_details --> >+ </td> >+ <td class="actions"> >+ <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">MARC</a> >+ <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">Card</a> >+ <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&breedingid=[% biblio.import_record_id | uri %]&import_batch_id=[% biblio.import_batch_id | uri %]&biblionumber=[% biblio.match_biblionumber | uri %]" class="btn btn-default btn-xs">Add order</a> >+ [% IF ( biblio.iteminfos.size ) %] >+ <div class="item_edit_form"> >+ [% IF biblio.item_error %]Item records could not be processed because the number of item fields was uneven.[% END %] >+ [% FOREACH item IN biblio.iteminfos %] >+ <fieldset> >+ <legend>Item record [% item.item_id | html %]</legend> >+ <ol> >+ <li> >+ <label for="homebranch_item_[% item.item_id | html %]">homebranch</label> >+ <select id="homebranch_item_[% item.item_id | html %]" name="homebranch_[% biblio.import_record_id | html %]"> >+ [% FOREACH l IN libraries %] >+ [% IF l.branchcode == item.homebranch %] >+ <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >+ [% ELSE %] >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> > [% END %] >- </select> >- </li> >+ [% END %] >+ </select> >+ </li> > >- <li> >- <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label> >- <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% biblio.import_record_id | html %]"> >- [% FOREACH l IN libraries %] >- [% IF l.branchcode == item.holdingbranch %] >- <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >- [% ELSE %] >- <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >- [% END %] >+ <li> >+ <label for="holdingbranch_item_[% item.item_id | html %]">holdingbranch</label> >+ <select id="holdingbranch_item_[% item.item_id | html %]" name="holdingbranch_[% biblio.import_record_id | html %]"> >+ [% FOREACH l IN libraries %] >+ [% IF l.branchcode == item.holdingbranch %] >+ <option value="[% l.branchcode | html %]" selected="selected">[% l.branchname | html %]</option> >+ [% ELSE %] >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> > [% END %] >- </select> >- </li> >- <li> >- <label for="itype_item_[% item.item_id | html %]">itype</label> >- <select id="itype_item_[% item.item_id | html %]" name="itype_[% biblio.import_record_id | html %]"> >- [% FOREACH itemtype IN itemtypes %] >- [% IF itemtype.itemtype == item.itype %] >- <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option> >- [% ELSE %] >- <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option> >- [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="itype_item_[% item.item_id | html %]">itype</label> >+ <select id="itype_item_[% item.item_id | html %]" name="itype_[% biblio.import_record_id | html %]"> >+ [% FOREACH itemtype IN itemtypes %] >+ [% IF itemtype.itemtype == item.itype %] >+ <option value="[% itemtype.itemtype | html %]" selected="selected">[% itemtype.description | html %]</option> >+ [% ELSE %] >+ <option value="[% itemtype.itemtype | html %]">[% itemtype.description | html %]</option> > [% END %] >- </select> >- </li> >+ [% END %] >+ </select> >+ </li> > >- <li> >- <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label> >- <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% biblio.import_record_id | html %]" value="[% item.nonpublic_note | html %]"> >- </li> >- <li> >- <label for="public_note_item_[% item.item_id | html %]">public_note</label> >- <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% biblio.import_record_id | html %]" value="[% item.public_note | html %]"> >- </li> >- <li> >- <label for="loc_item_[% item.item_id | html %]">loc</label> >- <select id="loc_item_[% item.item_id | html %]" name="loc_[% biblio.import_record_id | html %]"> >- <option value=""> </option> >- [% FOREACH locationloo IN locationloop %] >- [% IF ( locationloo.code ) == (item.loc) %] >- <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option> >- [% ELSE %] >- <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option> >- [% END %] >+ <li> >+ <label for="nonpublic_note_item_[% item.item_id | html %]">nonpublic_note</label> >+ <input type="text" id="nonpublic_note_item_[% item.item_id | html %]" name="nonpublic_note_[% biblio.import_record_id | html %]" value="[% item.nonpublic_note | html %]"> >+ </li> >+ <li> >+ <label for="public_note_item_[% item.item_id | html %]">public_note</label> >+ <input type="text" id="public_note_item_[% item.item_id | html %]" name="public_note_[% biblio.import_record_id | html %]" value="[% item.public_note | html %]"> >+ </li> >+ <li> >+ <label for="loc_item_[% item.item_id | html %]">loc</label> >+ <select id="loc_item_[% item.item_id | html %]" name="loc_[% biblio.import_record_id | html %]"> >+ <option value=""> </option> >+ [% FOREACH locationloo IN locationloop %] >+ [% IF ( locationloo.code ) == (item.loc) %] >+ <option value="[% locationloo.code | html %]" selected="selected">[% locationloo.description | html %]</option> >+ [% ELSE %] >+ <option value="[% locationloo.code | html %]">[% locationloo.description | html %]</option> > [% END %] >- </select> >- </li> >+ [% END %] >+ </select> >+ </li> > >- <li> >- <label for="ccode_item_[% item.item_id | html %]">ccode</label> >- <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% biblio.import_record_id | html %]"> >- <option value=""> </option> >- [% FOREACH ccodeloo IN ccodeloop %] >- [% IF ( ccodeloo.code ) == (item.ccode) %] >- <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option> >- [% ELSE %] >- <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option> >- [% END %] >+ <li> >+ <label for="ccode_item_[% item.item_id | html %]">ccode</label> >+ <select id="ccode_item_[% item.item_id | html %]" name="ccode_[% biblio.import_record_id | html %]"> >+ <option value=""> </option> >+ [% FOREACH ccodeloo IN ccodeloop %] >+ [% IF ( ccodeloo.code ) == (item.ccode) %] >+ <option value="[% ccodeloo.code | html %]" selected="selected">[% ccodeloo.description | html %]</option> >+ [% ELSE %] >+ <option value="[% ccodeloo.code | html %]">[% ccodeloo.description | html %]</option> > [% END %] >- </select> >- </li> >+ [% END %] >+ </select> >+ </li> > >- <li> >- <label for="notforloan_item_[% item.item_id | html %]">notforloan</label> >- <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% biblio.import_record_id | html %]"> >- <option value=""> </option> >- [% FOREACH n IN notforloanloop %] >- [% IF n.code == item.notforloan %] >- <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option> >- [% ELSE %] >- <option value="[% n.code | html %]">[% n.description | html %]</option> >- [% END %] >+ <li> >+ <label for="notforloan_item_[% item.item_id | html %]">notforloan</label> >+ <select id="notforloan_item_[% item.item_id | html %]" name="notforloan_[% biblio.import_record_id | html %]"> >+ <option value=""> </option> >+ [% FOREACH n IN notforloanloop %] >+ [% IF n.code == item.notforloan %] >+ <option value="[% n.code | html %]" selected="selected">[% n.description | html %]</option> >+ [% ELSE %] >+ <option value="[% n.code | html %]">[% n.description | html %]</option> > [% END %] >- </select> >- </li> >- <li> >- <label for="uri_item_[% item.item_id | html %]">uri</label> >- <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% biblio.import_record_id | html %]" value="[% item.uri | html %]"> >- </li> >- <li> >- <label for="copyno_item_[% item.item_id | html %]">copyno</label> >- <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% biblio.import_record_id | html %]" value="[% item.copyno | html %]"> >- </li> >- <li> >- <label for="budget_code_item_[% item.item_id | html %]">budget_code</label> >- <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]"> >- <option value="">Select a fund (will use default if set)</option> >- [% FOREACH budget_loo IN budget_loop %] >- [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option> >- [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option> >- [% END %] >+ [% END %] >+ </select> >+ </li> >+ <li> >+ <label for="uri_item_[% item.item_id | html %]">uri</label> >+ <input type="text" id="uri_item_[% item.item_id | html %]" name="uri_[% biblio.import_record_id | html %]" value="[% item.uri | html %]"> >+ </li> >+ <li> >+ <label for="copyno_item_[% item.item_id | html %]">copyno</label> >+ <input type="text" id="copyno_item_[% item.item_id | html %]" name="copyno_[% biblio.import_record_id | html %]" value="[% item.copyno | html %]"> >+ </li> >+ <li> >+ <label for="budget_code_item_[% item.item_id | html %]">budget_code</label> >+ <select class="budget_code_item" id="budget_code_item_[% item.item_id | html %]" name="budget_code_[% biblio.import_record_id | html %]"> >+ <option value="">Select a fund (will use default if set)</option> >+ [% FOREACH budget_loo IN budget_loop %] >+ [% IF ( budget_loo.b_id ) == ( item.budget_id ) %]<option value="[% budget_loo.b_id | html %]" selected="selected">[% budget_loo.b_txt | html %]</option> >+ [% ELSE %]<option value="[% budget_loo.b_id | html %]">[% budget_loo.b_txt | html %]</option> > [% END %] >- </select> >- <span class="item_fund required">Required</span> >- </li> >- <li> >- <label for="price_item_[% item.item_id | html %]">price</label> >- <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% biblio.import_record_id | html %]" value="[% item.itemprice | html %]"> >- </li> >- <li> >- <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label> >- <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% biblio.import_record_id | html %]" value="[% item.replacementprice | html %]"> >- </li> >- <li> >- <label for="callnumber_item_[% item.item_id | html %]">callnumber</label> >- <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]"> >- </li> >- </ol> >- </fieldset> >- [% END # /FOREACH item %] >- </div> <!-- /.item_edit_form --> >- [% END %] >- </fieldset> <!-- /.rows.order_details --> >- </td> >- <td class="actions"> >- <a href="/cgi-bin/koha/catalogue/showmarc.pl?importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">MARC</a> >- <a href="/cgi-bin/koha/catalogue/showmarc.pl?viewas=card&importid=[% biblio.import_record_id | uri %]" class="previewData btn btn-default btn-xs">Card</a> >- <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&breedingid=[% biblio.import_record_id | uri %]&import_batch_id=[% biblio.import_batch_id | uri %]&biblionumber=[% biblio.match_biblionumber | uri %]" class="btn btn-default btn-xs">Add order</a> >+ [% END %] >+ </select> >+ <span class="item_fund required">Required</span> >+ </li> >+ <li> >+ <label for="price_item_[% item.item_id | html %]">price</label> >+ <input type="text" id="price_item_[% item.item_id | html %]" name="itemprice_[% biblio.import_record_id | html %]" value="[% item.itemprice | html %]"> >+ </li> >+ <li> >+ <label for="replacementprice_item_[% item.item_id | html %]">replacement price</label> >+ <input type="text" id="replacementprice_item_[% item.item_id | html %]" name="replacementprice_[% biblio.import_record_id | html %]" value="[% item.replacementprice | html %]"> >+ </li> >+ <li> >+ <label for="callnumber_item_[% item.item_id | html %]">callnumber</label> >+ <input type="text" id="callnumber_item_[% item.item_id | html %]" name="itemcallnumber_[% biblio.import_record_id | html %]" value="[% item.itemcallnumber | html %]"> >+ </li> >+ </ol> >+ </fieldset> >+ [% END # /FOREACH item %] >+ </div> <!-- /.item_edit_form --> >+ [% END %] > </td> > </tr> > [% END # /FOREACH biblio %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >index 850eb02929..a10e1bc3b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/addorderiso2709.js >@@ -19,16 +19,19 @@ $(document).ready(function() { > }); > > $(".order_details").hide(); >+ $('.item_edit_form').hide(); > $('input:checkbox[name="import_record_id"]').change(function(){ >- var container = $(this).parents("tr"); >+ var container = $(this).closest("tr"); > if ( $(this).is(':checked') ) { > $(container).addClass("selected"); > $(container).removeClass("unselected"); > $(container).find(".order_details").toggle(true); >+ $(container).find('.item_edit_form').toggle(true); > } else { > $(container).addClass("unselected"); > $(container).removeClass("selected"); > $(container).find(".order_details").toggle(false); >+ $(container).find('.item_edit_form').toggle(false); > } > } ); > >-- >2.30.2
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 33748
:
151315
|
151323
|
151324
|
151325
|
151326
|
151329
|
151345
|
151346
|
151347
|
151713
|
151714
|
151896