Bug 18706 - subfields to delete not disabled anymore in batch item modification
Summary: subfields to delete not disabled anymore in batch item modification
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
Depends on: 13501
Blocks: 18710
  Show dependency treegraph
 
Reported: 2017-05-31 13:58 UTC by Fridolin SOMERS
Modified: 2017-06-13 06:03 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 18706 - subfields to delete not disabled anymore in batch item modification (2.03 KB, patch)
2017-05-31 14:14 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 18706 - Remove useless Javascript (1.25 KB, patch)
2017-05-31 14:15 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18706 - subfields to delete not disabled anymore in batch item modification (2.10 KB, patch)
2017-05-31 19:58 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 18706 - Remove useless Javascript (1.32 KB, patch)
2017-05-31 19:58 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 18706 - subfields to delete not disabled anymore in batch item modification (2.16 KB, patch)
2017-06-09 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 18706 - Remove useless Javascript (1.38 KB, patch)
2017-06-09 15:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2017-05-31 13:58:46 UTC
In Tools > Batch item modification, one can click a checkbox to delete a subfield.
This click use to disable the input to change the field value.

This comes from the patch : Bug 13501: Move "Required" and checkbox after input/select
Because input is found using JQuery next().
Comment 1 Fridolin SOMERS 2017-05-31 14:14:48 UTC
Created attachment 63864 [details] [review]
Bug 18706 - subfields to delete not disabled anymore in batch item modification

In Tools > Batch item modification, one can click a checkbox to delete a subfield.
This click use to disable the input to change the field value.

This comes from the patch : Bug 13501: Move "Required" and checkbox after input/select
Because input is found using JQuery next().

This patch replaces with $(this).parent().find("[name='field_value']").

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Click on a checkbox on a non-mandatory subfield
=> Without patch the input or select is not disabled
=> With patch the input or select is disabled
- Submit
=> Check that subfield is deleted
Comment 2 Fridolin SOMERS 2017-05-31 14:15:04 UTC
Created attachment 63865 [details] [review]
Bug 18706 - Remove useless Javascript

Whe checking a subfield to be deleted, the code
  $(this).val($(this).siblings("[name='subfield']").val());
is useless, the checkbox already contains the subfield code :
  <input type="checkbox" ... name="disable_input" value="[% ite.subfield %]" />
Comment 3 Josef Moravec 2017-05-31 19:58:00 UTC
Created attachment 63890 [details] [review]
[SIGNED-OFF] Bug 18706 - subfields to delete not disabled anymore in batch item modification

In Tools > Batch item modification, one can click a checkbox to delete a subfield.
This click use to disable the input to change the field value.

This comes from the patch : Bug 13501: Move "Required" and checkbox after input/select
Because input is found using JQuery next().

This patch replaces with $(this).parent().find("[name='field_value']").

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Click on a checkbox on a non-mandatory subfield
=> Without patch the input or select is not disabled
=> With patch the input or select is disabled
- Submit
=> Check that subfield is deleted

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 4 Josef Moravec 2017-05-31 19:58:04 UTC
Created attachment 63891 [details] [review]
[SIGNED-OFF] Bug 18706 - Remove useless Javascript

Whe checking a subfield to be deleted, the code
  $(this).val($(this).siblings("[name='subfield']").val());
is useless, the checkbox already contains the subfield code :
  <input type="checkbox" ... name="disable_input" value="[% ite.subfield %]" />

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 5 Jonathan Druart 2017-06-09 15:28:07 UTC
Created attachment 64152 [details] [review]
Bug 18706 - subfields to delete not disabled anymore in batch item modification

In Tools > Batch item modification, one can click a checkbox to delete a subfield.
This click use to disable the input to change the field value.

This comes from the patch : Bug 13501: Move "Required" and checkbox after input/select
Because input is found using JQuery next().

This patch replaces with $(this).parent().find("[name='field_value']").

Test plan :
- Go to Tools > Batch item modification
- Enter a barcode and submit
- Click on a checkbox on a non-mandatory subfield
=> Without patch the input or select is not disabled
=> With patch the input or select is disabled
- Submit
=> Check that subfield is deleted

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2017-06-09 15:28:10 UTC
Created attachment 64153 [details] [review]
Bug 18706 - Remove useless Javascript

Whe checking a subfield to be deleted, the code
  $(this).val($(this).siblings("[name='subfield']").val());
is useless, the checkbox already contains the subfield code :
  <input type="checkbox" ... name="disable_input" value="[% ite.subfield %]" />

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2017-06-09 15:47:46 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 8 Fridolin SOMERS 2017-06-12 10:48:19 UTC
Pushed to 17.05.x, will be in 17.05.01
Comment 9 Katrin Fischer 2017-06-13 06:03:56 UTC
This patch has been pushed to 16.11.x and will be in 16.11.09.

Please sign-off on bug 18710!