Bugzilla – Attachment 63879 Details for
Bug 18710
Wrong subfield modified in batch item modification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18710 - Wrong subfield modified in batch item modification
Bug-18710---Wrong-subfield-modified-in-batch-item-.patch (text/plain), 2.49 KB, created by
Fridolin Somers
on 2017-05-31 15:12:10 UTC
(
hide
)
Description:
Bug 18710 - Wrong subfield modified in batch item modification
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2017-05-31 15:12:10 UTC
Size:
2.49 KB
patch
obsolete
>From d5254b003b1d9a26016a564dee56c60475c5853b Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Wed, 31 May 2017 16:54:32 +0200 >Subject: [PATCH] Bug 18710 - Wrong subfield modified in batch item > modification > >In Tools > Batch item modification, one can modify or delete a subfield. >When deleting a subfield et modifying another, the wrong subfield gets modified. > >This is caused by the fact that disabled inputs are not posted in form. >So for a subfield to delete : >Input name=field_value is not posted. But input name=subfield is posted with subfield code. >So these 2 arrays does not have the same size : > my @subfields = $input->multi_param('subfield'); > my @values = $input->multi_param('field_value'); > >For exemple, deleting $2, not changing $u and modidying $v will modify $u with value for $v o_O > >This patch correts but setting disabled all inputs of a deleted subfield : field_value, tag, subfield and mandatory. Like it was not present in the form. > >Test plan : >- Go to Tools > Batch item modification >- Enter a barcode and submit >- Lets say there are subfields : $2 (not mandatory), $u and $v >- Check the subfield $2 to be deleted >=> $2 input is disabled >- Enter a text in $v >- Submit the form >=> Without patch, the text for $v gets into $u >=> With patch, the text for $v gets into $v >- Check the subfield $2 is well deleted >--- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index d689273..681a166 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -22,12 +22,12 @@ $(document).ready(function(){ > $("input[name='disable_input']").click(function() { > var row = $(this).attr("id"); > row = row.replace("row","hint"); >- var editor = $(this).parent().find("[name='field_value']"); >+ var todisable = $(this).parent().find("[name='field_value'],[name='tag'],[name='subfield'],[name='mandatory']"); > if ($(this).is(":checked")) { >- $(editor).prop('disabled', true); >+ $(todisable).prop('disabled', true); > $("#"+row).html(_("This subfield will be deleted")); > } else { >- $(editor).prop('disabled', false); >+ $(todisable).prop('disabled', false); > $("#"+row).html(""); > } > }); >-- >2.7.4
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 18710
:
63879
|
63880
|
93145
|
93179