If you try to add a user as a manager of a basket and the user's name contains a single quote it will trigger a JavaScript error and the operation will fail without any visible error.
Created attachment 51188 [details] [review] Bug 13041 - Can't add user as manager of basket if name includes a single quote If you are trying to add a user as a manager of a basket in acquisitions, a JavaScript error will be triggered if that user has a single quote in their name (e.g. "O'Neil"). This patch corrects the issue by removing the "onclick" attribute and using the JS change made in Bug 16386. Also changed by this patch: Increased the size of the patron search popup and made a correction to some invalid HTML. To test you should have a patron whose name contains a single quote who is also a user with permission to manage acquisitions. - Apply the patch and go to Acquisitions. - Locate an open basket and view the details for that basket. - In the "Managed by" section, click the "Add user" button to trigger the patron search popup. - Search for the patron described above and click the "Add" button. - In the parent window, the patron you chose should have been added to the "Managed by" section.
Created attachment 51234 [details] [review] Bug 13041 - Can't add user as manager of basket if name includes a single quote If you are trying to add a user as a manager of a basket in acquisitions, a JavaScript error will be triggered if that user has a single quote in their name (e.g. "O'Neil"). This patch corrects the issue by removing the "onclick" attribute and using the JS change made in Bug 16386. Also changed by this patch: Increased the size of the patron search popup and made a correction to some invalid HTML. To test you should have a patron whose name contains a single quote who is also a user with permission to manage acquisitions. - Apply the patch and go to Acquisitions. - Locate an open basket and view the details for that basket. - In the "Managed by" section, click the "Add user" button to trigger the patron search popup. - Search for the patron described above and click the "Add" button. - In the parent window, the patron you chose should have been added to the "Managed by" section. Tested on top of Bug 16383, behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 51264 [details] [review] [PASSED QA] Bug 16386 - Replace the use of "onclick" from patron card creator templates This patch removes the use of "onclick" from several patron card creator templates. Events are defined instead in JavaScript. Also changed: - Patron search pop-up window is now slightly larger because I found it never quite large enough to prevent horizontal scrolling. - Replaced "Borrower" with "Patron" in a couple of places. - "Add" link in patron search pop-up is now styled as a Bootstrap button. - Removed Bootstrap styles from some submit buttons. - Some Font Awesome icons were made using the invalid element <icon></icon> instead of <i></i>. These are corrected. - Fixed some other HTML validation errors. To test, apply the patch and go to Tools -> Patron card creator. - Choose New -> Card batch. - Click "Add patrons" and perform a search for patrons in the pop-up window. - Click the "Add" button. The corresponding borrowernumber should be added to the textarea in the parent window, and a message should appear at the top of the pop-up window confirming that the patron has been added. (Note: This patch fixes a version of Bug 13041 which prevented the "add" button from working on patrons whose name include an apostrophe). - In the parent page, in the list of patrons you added to the batch, confirm that clicking the "Delete" link triggers a confirmation dialog. Test both confirming and canceling. - Confirm that clicking the "Export" button next to an individual patron triggers a modal window. - In the export window, confirm that the "Cancel" link works to close the modal. - Click the "Export" button again and then the "Export" button in the modal. - Test that the "Done" button works to close the modal. - Choose Manage -> Card batches. - Test the "Delete" and "Export" buttons as described above. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> All works, no errors. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 51266 [details] [review] [PASSED QA] Bug 13041 - Can't add user as manager of basket if name includes a single quote If you are trying to add a user as a manager of a basket in acquisitions, a JavaScript error will be triggered if that user has a single quote in their name (e.g. "O'Neil"). This patch corrects the issue by removing the "onclick" attribute and using the JS change made in Bug 16386. Also changed by this patch: Increased the size of the patron search popup and made a correction to some invalid HTML. To test you should have a patron whose name contains a single quote who is also a user with permission to manage acquisitions. - Apply the patch and go to Acquisitions. - Locate an open basket and view the details for that basket. - In the "Managed by" section, click the "Add user" button to trigger the patron search popup. - Search for the patron described above and click the "Add" button. - In the parent window, the patron you chose should have been added to the "Managed by" section. Tested on top of Bug 16383, behaves as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 Release. Thanks!
Created attachment 51321 [details] [review] [3.22.x] Bug 13041: Fix add of basket's manager when name contains a single quote Patch for 3.22.x
Patch pushed to 3.22.x, will be in 3.22.7
Pushed to 3.20.x will be in 3.20.11