Bugzilla – Attachment 169901 Details for
Bug 34355
Automated MARC record ordering process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34355: Fix form rendering issue
Bug-34355-Fix-form-rendering-issue.patch (text/plain), 15.88 KB, created by
Matt Blenkinsop
on 2024-07-31 15:10:43 UTC
(
hide
)
Description:
Bug 34355: Fix form rendering issue
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2024-07-31 15:10:43 UTC
Size:
15.88 KB
patch
obsolete
>From 4e6f48c19a2f3e1c082cb5abf44c3aae211c0d1d Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Thu, 10 Aug 2023 14:23:18 +0000 >Subject: [PATCH] Bug 34355: Fix form rendering issue > >This patch also fixes the referencing of import_record_id_selected >--- > Koha/MarcOrder.pm | 7 +- > .../en/modules/admin/marc_order_accounts.tt | 145 +++++++++++++++--- > 2 files changed, 131 insertions(+), 21 deletions(-) > >diff --git a/Koha/MarcOrder.pm b/Koha/MarcOrder.pm >index 8373c99c897..2ec28cff59e 100644 >--- a/Koha/MarcOrder.pm >+++ b/Koha/MarcOrder.pm >@@ -48,6 +48,7 @@ use C4::Biblio qw( > AddBiblio > GetMarcFromKohaField > TransformHtmlToXml >+ GetMarcQuantity > ); > use C4::Items qw( AddItemFromMarc ); > use C4::Budgets qw( GetBudgetByCode ); >@@ -171,7 +172,7 @@ sub import_record_and_create_order_lines { > my ( $self, $args ) = @_; > > my $import_batch_id = $args->{import_batch_id}; >- my @import_record_id_selected = $args->{import_record_id_selected} || (); >+ my $import_record_id_selected = $args->{import_record_id_selected} || (); > my $matcher_id = $args->{matcher_id}; > my $overlay_action = $args->{overlay_action}; > my $import_record = $args->{import_record}; >@@ -438,7 +439,7 @@ sub add_biblio_from_import_record { > my ($args) = @_; > > my $import_batch_id = $args->{import_batch_id}; >- my @import_record_id_selected = $args->{import_record_id_selected} || (); >+ my $import_record_id_selected = $args->{import_record_id_selected} || (); > my $matcher_id = $args->{matcher_id}; > my $overlay_action = $args->{overlay_action}; > my $import_record = $args->{import_record}; >@@ -451,7 +452,7 @@ sub add_biblio_from_import_record { > record_result => 0, > duplicates_in_batch => 0, > skip => 1 >- } if not grep { $_ eq $import_record->import_record_id } @import_record_id_selected; >+ } if not grep { $_ eq $import_record->import_record_id } @{$import_record_id_selected}; > } > > my $marcrecord = $import_record->get_marc_record || die "Couldn't translate marc information"; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >index b81c10b9b51..936247ea87d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc_order_accounts.tt >@@ -7,9 +7,6 @@ > <title> > MARC Order Accounts > </title> >-<style> >- #fileuploadstatus,#fileuploadfailed,#fileuploadcancel { display : none; } >-</style> > [% INCLUDE 'doc-head-close.inc' %] > </head> > <body id="admin_marc_order_acct" class="admin"> >@@ -138,19 +135,59 @@ MARC Order Accounts > <li> > <label for='record_type'>Record type:</label> > <select name='record_type' id='record_type'> >- <option value='biblio' selected='selected'>Bibliographic</option> >- <option value='auth'>Authority</option> >+ [% IF ( account.record_type == 'biblio' ) %] >+ <option value="biblio" selected="selected"> >+ [% ELSE %] >+ <option value="biblio"> >+ [% END %] >+ Bibliographic</option> >+ [% IF ( account.record_type == 'auth' ) %] >+ <option value="auth" selected="selected"> >+ [% ELSE %] >+ <option value="auth"> >+ [% END %] >+ Authority</option> > </select> > </li> > <li> > <label for="encoding">Character encoding: </label> > <select name="encoding" id="encoding"> >- <option value="UTF-8" selected="selected">UTF-8 (Default)</option> >- <option value="MARC-8">MARC 8</option> >- <option value="ISO_5426">ISO 5426</option> >- <option value="ISO_6937">ISO 6937</option> >- <option value="ISO_8859-1">ISO 8859-1</option> >- <option value="EUC-KR">EUC-KR</option> >+ [% IF ( account.encoding == 'UTF-8' ) %] >+ <option value="UTF-8" selected="selected"> >+ [% ELSE %] >+ <option value="UTF-8"> >+ [% END %] >+ UTF-8 (Default)</option> >+ [% IF ( account.encoding == 'MARC-8' ) %] >+ <option value="MARC-8" selected="selected"> >+ [% ELSE %] >+ <option value="MARC-8"> >+ [% END %] >+ MARC 8</option> >+ [% IF ( account.encoding == 'ISO_5426' ) %] >+ <option value="ISO_5426" selected="selected"> >+ [% ELSE %] >+ <option value="ISO_5426"> >+ [% END %] >+ ISO 5426</option> >+ [% IF ( account.encoding == 'ISO_6937' ) %] >+ <option value="ISO_6937" selected="selected"> >+ [% ELSE %] >+ <option value="ISO_6937"> >+ [% END %] >+ ISO 6937</option> >+ [% IF ( account.encoding == 'ISO_8859-1' ) %] >+ <option value="ISO_8859-1" selected="selected"> >+ [% ELSE %] >+ <option value="ISO_8859-1"> >+ [% END %] >+ ISO 8859-1</option> >+ [% IF ( account.encoding == 'EUC-KR' ) %] >+ <option value="EUC-KR" selected="selected"> >+ [% ELSE %] >+ <option value="EUC-KR"> >+ [% END %] >+ EUC-KR</option> > </select> > </li> > </ol> >@@ -162,7 +199,7 @@ MARC Order Accounts > <label for="matcher">Record matching rule:</label> > <select name="matcher" id="matcher"> > [% FOREACH available_matcher IN available_matchers %] >- [% IF available_matcher.id == account.matcher_id %] >+ [% IF available_matcher.matcher_id == account.matcher_id %] > <option value="[% available_matcher.matcher_id | html %]" selected="selected">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option> > [% ELSE %] > <option value="[% available_matcher.matcher_id | html %]">[% available_matcher.code | html %] ([% available_matcher.description | html %])</option> >@@ -172,11 +209,43 @@ MARC Order Accounts > </li> > <li> > <label for="overlay_action">Action if matching record found: </label> >- [% INCLUDE 'tools-overlay-action.inc' %] >+ <select name="overlay_action" id="overlay_action"> >+ [% IF ( account.overlay_action == 'replace' ) %] >+ <option value="replace" selected="selected"> >+ [% ELSE %] >+ <option value="replace"> >+ [% END %] >+ Replace existing record with incoming record</option> >+ [% IF ( account.overlay_action == 'create_new' ) %] >+ <option value="create_new" selected="selected"> >+ [% ELSE %] >+ <option value="create_new"> >+ [% END %] >+ Add incoming record</option> >+ [% IF ( account.overlay_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore incoming record (its items may still be processed)</option> >+ </select> > </li> > <li> > <label for="nomatch_action">Action if no match is found: </label> >- [% INCLUDE 'tools-nomatch-action.inc' %] >+ <select name="nomatch_action" id="nomatch_action"> >+ [% IF ( account.nomatch_action == 'create_new' ) %] >+ <option value="create_new" selected="selected"> >+ [% ELSE %] >+ <option value="create_new"> >+ [% END %] >+ Add incoming record</option> >+ [% IF ( account.nomatch_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore incoming record</option> >+ </select> > </li> > </ol> > </fieldset> >@@ -184,17 +253,57 @@ MARC Order Accounts > <legend>Check for embedded item record data?</legend> > <ol> > <li class="radio"> >- <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" /> >+ [% IF ( account.parse_items == 1 || !account ) %] >+ <input type="radio" id="parse_itemsyes" name="parse_items" value="1" checked="checked" /> >+ [% ELSE %] >+ <input type="radio" id="parse_itemsyes" name="parse_items" value="1" /> >+ [% END %] > <label for="parse_itemsyes">Yes</label> > </li> > <li class="radio"> >- <input type="radio" id="parse_itemsno" name="parse_items" value="0" /> >+ [% IF ( account.parse_items == 0 ) %] >+ <input type="radio" id="parse_itemsno" name="parse_items" value="0" checked="checked" /> >+ [% ELSE %] >+ <input type="radio" id="parse_itemsno" name="parse_items" value="0" /> >+ [% END %] > <label for="parse_itemsno">No</label> > </li> > </ol> > <ol> >- <li><label for="item_action">How to process items: </label> >- [% INCLUDE 'tools-item-action.inc' %] >+ <li> >+ <label for="item_action">How to process items: </label> >+ <select name="item_action" id="item_action"> >+ [% IF ( account.item_action == 'always_add' ) %] >+ <option value="always_add" selected="selected"> >+ [% ELSE %] >+ <option value="always_add"> >+ [% END %] >+ Always add items</option> >+ [% IF ( account.item_action == 'add_only_for_matches' ) %] >+ <option value="add_only_for_matches" selected="selected"> >+ [% ELSE %] >+ <option value="add_only_for_matches"> >+ [% END %] >+ Add items only if matching bib was found</option> >+ [% IF ( account.item_action == 'add_only_for_new' ) %] >+ <option value="add_only_for_new" selected="selected"> >+ [% ELSE %] >+ <option value="add_only_for_new"> >+ [% END %] >+ Add items only if no matching bib was found</option> >+ [% IF ( account.item_action == 'replace' ) %] >+ <option value="replace" selected="selected"> >+ [% ELSE %] >+ <option value="replace"> >+ [% END %] >+ Replace items if matching bib was found (only for existing items)</option> >+ [% IF ( account.item_action == 'ignore' ) %] >+ <option value="ignore" selected="selected"> >+ [% ELSE %] >+ <option value="ignore"> >+ [% END %] >+ Ignore items</option> >+ </select> > </li> > </ol> > </fieldset> >-- >2.39.3 (Apple Git-146)
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 34355
:
154705
|
154706
|
154707
|
154708
|
154709
|
154710
|
157092
|
157093
|
157094
|
157095
|
157096
|
157097
|
157098
|
157099
|
157100
|
160858
|
160859
|
160860
|
160861
|
160862
|
160863
|
160864
|
160865
|
160866
|
160867
|
160868
|
160869
|
160870
|
160871
|
160872
|
160873
|
160874
|
160875
|
169896
|
169897
|
169898
|
169899
|
169900
|
169901
|
169902
|
169903
|
169904
|
170395
|
170401
|
170402
|
170403
|
170404
|
170405
|
170406
|
170407
|
170408
|
170409
|
173054
|
173055
|
173056
|
173057
|
173058
|
173059
|
173060
|
173061
|
173062
|
173063
|
173064
|
173065
|
173066
|
173709
|
173805
|
173806
|
173809
|
173824
|
173825
|
173993
|
173994
|
173995
|
173996
|
173997
|
173998
|
173999
|
174000
|
174001
|
174002
|
174003
|
174004
|
174005
|
174006
|
174007
|
174008
|
174009
|
174010
|
174362
|
174363
|
174364
|
174365
|
174366
|
174367
|
174368
|
174369
|
174370
|
174371
|
174372
|
174373
|
174374
|
174375
|
174376
|
174377
|
174378
|
174379
|
174380
|
174382
|
174383