Bug 3137 - Allow to collapse areas of the patron add form by default
Summary: Allow to collapse areas of the patron add form by default
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: PC All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Bugs List
URL:
Keywords:
: 24758 (view as bug list)
Depends on:
Blocks: 29215
  Show dependency treegraph
 
Reported: 2009-04-18 09:38 UTC by Nicole C. Engard
Modified: 2021-10-12 19:09 UTC (History)
14 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement, when utilised, allows administrators to control which field sets are collapsed by default on the add patron form. Each collapsed section can still easily be uncollapsed by clicking on the section heading. **New system preference**: `CollapseFieldsPatronAddForm` defaults to empty.
Version(s) released in:
20.05.00


Attachments
Bug 3137: HideFieldsAddPatronForm syspref (14.25 KB, patch)
2017-04-05 04:08 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 3137: HideFieldsAddPatronForm syspref (14.26 KB, patch)
2017-04-05 04:22 UTC, Aleisha Amohia
Details | Diff | Splinter Review
display problem when unhiding all (190.51 KB, image/jpeg)
2017-05-01 14:48 UTC, Katrin Fischer
Details
Bug 3137: [FOLLOW-UP] Remove checkboxes, add collapsing sections (22.20 KB, patch)
2017-06-07 23:50 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 3137: [FOLLOW-UP] Remove checkboxes, add collapsing sections (22.25 KB, patch)
2017-08-29 16:11 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 3137: HideFieldsAddPatronForm syspref (14.38 KB, patch)
2017-08-29 16:15 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 3137: [FOLLOW-UP] Remove checkboxes, add collapsing sections (22.25 KB, patch)
2017-08-29 16:15 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 3137: HideFieldsPatronAddForm syspref (11.50 KB, patch)
2020-02-09 20:46 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 3137: HideFieldsPatronAddForm syspref (12.40 KB, patch)
2020-02-09 21:18 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 21156: (RM follow-up) Add missing filters (1.27 KB, patch)
2020-02-10 19:15 UTC, David Nind
Details | Diff | Splinter Review
Bug 3137: HideFieldsPatronAddForm syspref (12.47 KB, patch)
2020-02-10 19:15 UTC, David Nind
Details | Diff | Splinter Review
Bug 3137: HideFieldsPatronAddForm syspref (12.52 KB, patch)
2020-02-25 18:57 UTC, David Nind
Details | Diff | Splinter Review
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing (8.67 KB, patch)
2020-03-11 04:05 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 3137: CollapseFieldsPatronAddForm system preference (12.62 KB, patch)
2020-03-11 18:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing (8.74 KB, patch)
2020-03-11 18:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 3137: HideFieldsPatronAddForm syspref (12.67 KB, patch)
2020-03-15 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing (8.80 KB, patch)
2020-03-15 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 3137: (QA follow-up) Switch hidden for collapsed in text (1.71 KB, patch)
2020-03-15 21:44 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2010-05-21 01:06:53 UTC


---- Reported by nengard@gmail.com 2009-04-18 21:38:02 ----

After talking to Owen, we came up with an idea that he needs help with.  He will add in styles to the templates to identify the different sections on the ADD PATRON form and then we'd like to see a system preference like the one we have for the patron required fields that lets you pick which sections to have collapsed by default.  Then those sections will have a plus (+) next to them so that you can expand them if you need - but they are taking up less space for the every day usage.

The purpose of this is to shorten the ADD PATRON form so that it's not so much tabbing or scrolling.



--- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:06 UTC  ---

This bug was previously known as _bug_ 3137 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3137

Actual time not defined. Setting to 0.0
CC member bchurch@ptfs.com does not have an account here

Comment 1 Aleisha Amohia 2017-04-05 04:08:13 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2017-04-05 04:22:29 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2017-04-05 10:12:06 UTC
I like the idea.

However:

If I disable e.g. Alternate address and then, from a patron's detail page, follow the "Edit" link for Alternate address, I get an empty form, and I can not toggle the fields. I would expect that the fields display anyway (without toggling), since I explicitely clicked the "Edit" button for Alternate address. - I think it is the same for all partial edit forms.
Comment 4 Katrin Fischer 2017-05-01 14:47:06 UTC
I have tested this quickly, but there is a display problem, where not all sections reappear. What I have done:
- In the system preference, select all and save
- In the patron add form, display all using the link
- Notice some areas don't disappear/blue blocks are shown (see screenshot attached)

I really like the idea of simplyfing the form a bit, but I would like to suggest to make use of the initial idea of collapsing/uncollapsing sections.

Following scenario: I have a minimal patron add form with say, the second and third address hidden by default. While entering the data, I notice that I have to enter a second address.
With this patch, I have to scroll back up, unlock all the hidden fields, scroll down and find the right ones. 
I think it would be nicer if the interface would always show the section headings (collapsing some according to the system preference) and then allow me to click on the heading to uncollapse/unfold the fields. That way I could keep entering data without the scrolling action.

I hope that makes sense!
Comment 5 Katrin Fischer 2017-05-01 14:48:21 UTC
Created attachment 62920 [details]
display problem when unhiding all
Comment 6 Aleisha Amohia 2017-06-07 23:50:58 UTC Comment hidden (obsolete)
Comment 7 Harold 2017-06-23 03:45:22 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2017-08-29 16:11:32 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2017-08-29 16:15:51 UTC
Created attachment 66591 [details] [review]
[SIGNED-OFF] Bug 3137: HideFieldsAddPatronForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsAddPatronForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Owen Leonard 2017-08-29 16:15:54 UTC
Created attachment 66592 [details] [review]
[SIGNED-OFF] Bug 3137: [FOLLOW-UP] Remove checkboxes, add collapsing sections

This patch removes the checkboxes from my previous patch and adds
collapsing/uncollapsing sections.

Follow the above test plan until step 6. The fields selected in
HideFieldsAddPatronForm will still be hidden, but can now be shown and
collapsed again (as well as all other sections) much more easily and
without scrolling.

Sponsored-by: Catalyst IT

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Nick Clemens 2017-10-26 11:00:41 UTC
Applying: Bug 3137: [FOLLOW-UP] Remove checkboxes, add collapsing sections
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Comment 12 Aleisha Amohia 2020-02-09 20:46:59 UTC
Created attachment 98623 [details] [review]
Bug 3137: HideFieldsPatronAddForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.

Sponsored-by: Catalyst IT
Comment 13 Aleisha Amohia 2020-02-09 21:18:49 UTC
Created attachment 98626 [details] [review]
Bug 3137: HideFieldsPatronAddForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections

Sponsored-by: Catalyst IT
Comment 14 David Nind 2020-02-10 19:15:45 UTC
Created attachment 98682 [details] [review]
Bug 21156: (RM follow-up) Add missing filters

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: David Nind <david@davidnind.com>
Comment 15 David Nind 2020-02-10 19:15:49 UTC
Created attachment 98683 [details] [review]
Bug 3137: HideFieldsPatronAddForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 16 Katrin Fischer 2020-02-18 22:37:14 UTC
I've switched the sequence of patches when applying, but still get a conflict:

Apply? [(y)es, (n)o, (i)nteractive] i
Applying: Bug 3137: HideFieldsPatronAddForm syspref
Applying: Bug 21156: (RM follow-up) Add missing filters
Using index info to reconstruct a base tree...
M	koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
error: Failed to merge in the changes.
Patch failed at 0001 Bug 21156: (RM follow-up) Add missing filters
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-21156-RM-follow-up-Add-missing-filters-BipPBa.patch

Can you please rebase?
Comment 17 Aleisha Amohia 2020-02-25 02:23:25 UTC
(In reply to David Nind from comment #14)
> Created attachment 98682 [details] [review] [review]
> Bug 21156: (RM follow-up) Add missing filters
> 
> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
> 
> Signed-off-by: David Nind <david@davidnind.com>

I think this was accidentally attached... the real patch applies cleanly.
Comment 18 David Nind 2020-02-25 18:55:58 UTC
Apologies for that, signing off again (correctly this time!)
Comment 19 David Nind 2020-02-25 18:57:34 UTC
Created attachment 99606 [details] [review]
Bug 3137: HideFieldsPatronAddForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 20 Katrin Fischer 2020-02-29 19:40:15 UTC
Ok, one blocker and 2 suggestions:

Blocker:
1) The guarantor information won't collapse for me - can you please check?

Suggestions:

2) I love the word 'collapse' for this behaviour. I want to suggest renaming the preference from HideFieldsPatronAddForm to CollapseFieldsPatronAddForm.
I think using collapse would nicely set this off from other preferences like that actually hide things without giving the option to make them visible again.

We could even think about naming it a little differently, perhaps:
CollapseSectionsPatronAddForm. Not sure section is good, maybe areas? What I am htinking is that we don't really hide single fields, but 'parts' of the patron add form. 

3) I'd remove the a. b. c. etc. from the pref.
Comment 21 Aleisha Amohia 2020-03-01 20:33:52 UTC
(In reply to Katrin Fischer from comment #20)

> 3) I'd remove the a. b. c. etc. from the pref.

I added the letters so that the options would be sorted by how they appear in the field, without the letters the options get sorted alphabetically. Happy to make this change though if the order of the options is fine to be alphabetical
Comment 22 Aleisha Amohia 2020-03-11 04:05:10 UTC
Created attachment 100503 [details] [review]
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing
Comment 23 Fridolin Somers 2020-03-11 12:35:18 UTC
*** Bug 24758 has been marked as a duplicate of this bug. ***
Comment 24 David Nind 2020-03-11 18:29:24 UTC
Created attachment 100598 [details] [review]
Bug 3137: CollapseFieldsPatronAddForm system preference

This patches adds a syspref - CollapseFieldsAddPatronFrom - that
controls which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm CoolapseFieldsPatronAddForm 
has no fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the system prefereence to hide them in 
the form
5) Go back to the add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the check box and confirm the hidden fields show or hide as
expected.
8) Go back to the CollapseFieldsPatronAddForm system preference and
ensure the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>
Comment 25 David Nind 2020-03-11 18:29:28 UTC
Created attachment 100599 [details] [review]
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing

Signed-off-by: David Nind <david@davidnind.com>
Comment 26 Katrin Fischer 2020-03-12 17:28:43 UTC
Hi David, should the status here be Signed off?
Comment 27 David Nind 2020-03-12 19:33:51 UTC
Thanks Katrin for spotting! It should have been, have changed now.
Comment 28 Katrin Fischer 2020-03-15 21:44:43 UTC
Created attachment 100706 [details] [review]
Bug 3137: HideFieldsPatronAddForm syspref

This patches adds a syspref - HideFieldsAddPatronFrom - that controls
which fieldsets are hidden by default in the add patron form.

To test:
1) Apply patch and update database
2) Go to System preferences and confirm HideFieldsPatronAddForm has no
fields selected
3) Go to add a patron / edit an existing patron (any patron category).
confirm everything still works as expected.
4) Tick some of the fields in the syspref to hide them in the form
5) Go back to add patron form.
6) Confirm these fields are hidden and listed at the top of the page
7) Toggle the checkbox and confirm the hidden fields show or hide as
expected.
8) Go back to the HideFieldsPatronAddForm system preference and ensure
the Main address option is checked to be hidden
9) Go to the patron's details page
10) Click to edit the Contact Information section
11) Confirm the Main address option shows and the checkbox to show
hidden fields is not present.
12) Confirm you can click the legend of each section to show and hide
sections

Sponsored-by: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 29 Katrin Fischer 2020-03-15 21:44:48 UTC
Created attachment 100707 [details] [review]
Bug 3137: (follow-up) Rename using 'collapse', remove syspref lettering and fix guarantor section collapsing

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 30 Katrin Fischer 2020-03-15 21:44:52 UTC
Created attachment 100708 [details] [review]
Bug 3137: (QA follow-up) Switch hidden for collapsed in text

Changes the text and tooltip on top of the add/edit patron screen
to use collapsed instead of hidden.
Comment 31 Katrin Fischer 2020-03-15 21:45:45 UTC
Thx, Aleisha! Added a small follow-up, hope you agree.

First and second patch could be squashed by RM, as both have same author/sign-offer.
Comment 32 Martin Renvoize 2020-03-19 09:23:28 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 33 Joy Nelson 2020-04-03 20:22:03 UTC
enhancement not backported to 19.11.x