When selecting 'Non-patron guarantor' in CollapsedFieldsPatronAddForm the guarantor form is collapsed too. This is because we are doing a grep for the string and one contains the other
Created attachment 177532 [details] [review] Bug 39038: Grep for exacpt matches for collapsed fields This patch splits the preference into a list in TT and then uses grep to find exact matches for each field To test: 1 - Edit CollapsedFieldsPatronAddForm preference and check Non-patron guarantor and a few otehr fields, not Guarantor though 2 - Go to add a patron that can have a guarantor 3 - Note bot h guarantor fields are collapsed 4 - Apply patch, reload 5 - Note only expected fields are collapsed 6 - Confirm other fields continue to work as expected
Created attachment 177554 [details] [review] Bug 39038: Grep for exact matches for collapsed fields This patch splits the CollapseFieldsPatronAddForm system preference into a list in the template and then uses grep to find exact matches for each field. Test plan: 1. Edit CollapseFieldsPatronAddForm system preference and check the Non-patron guarantor and a few other fields, but not Guarantor. 2. Go to add a patron that can have a guarantor. 3. Note both guarantor fields are collapsed. 4. Apply patch, reload/ 5. Note only expected fields are collapsed. 6. Confirm other fields continue to work as expected. Signed-off-by: David Nind <david@davidnind.com>
I edited the commit message to use the correct system preference name, and fixed some spelling mistakes 8-) I've also created bug 39047. If you select the "Patron messaging preferences" option for the CollapseFieldsPatronAddForm system preference, when adding or editing patrons the collapsed section displays a progress spinner and "Loading new messaging defaults". (This is not related to this bug, as it did this before this patch.)
Created attachment 178097 [details] [review] Bug 39038: Grep for exact matches for collapsed fields This patch splits the CollapseFieldsPatronAddForm system preference into a list in the template and then uses grep to find exact matches for each field. Test plan: 1. Edit CollapseFieldsPatronAddForm system preference and check the Non-patron guarantor and a few other fields, but not Guarantor. 2. Go to add a patron that can have a guarantor. 3. Note both guarantor fields are collapsed. 4. Apply patch, reload/ 5. Note only expected fields are collapsed. 6. Confirm other fields continue to work as expected. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 178446 [details] [review] Bug 39038: Grep for exact matches for collapsed fields This patch splits the CollapseFieldsPatronAddForm system preference into a list in the template and then uses grep to find exact matches for each field. Test plan: 1. Edit CollapseFieldsPatronAddForm system preference and check the Non-patron guarantor and a few other fields, but not Guarantor. 2. Go to add a patron that can have a guarantor. 3. Note both guarantor fields are collapsed. 4. Apply patch, reload/ 5. Note only expected fields are collapsed. 6. Confirm other fields continue to work as expected. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Pushed for 25.05! Well done everyone, thank you!