Created attachment 127269 [details] [review] Bug 29407: Make the pickup locations dropdown JS reusable This patch generates a function to be used in places where select2 dropdowns are usesd for choosing pickup locations. This cleans repeated/almost identical code introduced by different bugs. To test: 1. Make sure choosing pickup locations works 2. Apply this patch 3. Repeat 1 => SUCCESS: No functional changes 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 127277 [details] [review] Bug 29407: Make the pickup locations dropdown JS reusable This patch generates a function to be used in places where select2 dropdowns are usesd for choosing pickup locations. This cleans repeated/almost identical code introduced by different bugs. To test: 1. Make sure choosing pickup locations works 2. Apply this patch 3. Repeat 1 => SUCCESS: No functional changes 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 127278 [details] [review] Bug 29407: Make the pickup locations dropdown JS reusable This patch generates a function to be used in places where select2 dropdowns are usesd for choosing pickup locations. This cleans repeated/almost identical code introduced by different bugs. To test: 1. Make sure choosing pickup locations works 2. Apply this patch 3. Repeat 1 => SUCCESS: No functional changes 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Small style fixes in the comments.
Created attachment 127316 [details] [review] Bug 29407: Make the pickup locations dropdown JS reusable This patch generates a function to be used in places where select2 dropdowns are usesd for choosing pickup locations. This cleans repeated/almost identical code introduced by different bugs. To test: 1. Make sure choosing pickup locations works 2. Apply this patch 3. Repeat 1 => SUCCESS: No functional changes 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 127319 [details] [review] Bug 29407: Make the pickup locations dropdown JS reusable This patch generates a function to be used in places where select2 dropdowns are usesd for choosing pickup locations. This cleans repeated/almost identical code introduced by different bugs. To test: 1. Make sure choosing pickup locations works 2. Apply this patch 3. Repeat 1 => SUCCESS: No functional changes 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice bit of code cleanup and DRYing out. No regressions found, QA script is happy, and code is clear. Passing QA
Pushed to master for 21.11, thanks to everybody involved!