reserve/request.tt contains several event attributes like "onclick" which should be removed in favor of defining events in JavaScript.
Created attachment 54055 [details] [review] Bug 17057 - Remove event attributes from holds template This patch removes event attributes from the holds template. Events are defined instead in the JavaScript. Also changed: Move formatting of hold date to the template; Corrected a non-functional 'cancel hold' link. To test apply the patch and: - Start the process of placing a hold on a single title for a patron. - Uncheck 'Place a hold on the next available item' and try to submit the form without selecting an item. You should be prompted to select an item. - Place a hold on multiple titles at the same time. Confirm that your hold is saved correctly. - View the holds for a title which has multiple holds. - Confirm that clicking the "X" image triggers a confirmation. Test canceling and confirming. - With SuspendHoldsIntranet enabled, select a 'Suspend until' date for any hold and confirm that the corresponding 'Clear date' link works correctly. - Confirm that suspending a hold with and without an expiration date works correctly. - Place an item-level hold. - View the holds for that same title. - Submit another patron to place a new hold. - In the list of items which can be placed on hold, look for the item you place on hold previously. There should be a "Cancel hold" link in the information column. Confirm that this link correctly triggers a confirmation dialog and deletes the hold.
Created attachment 54072 [details] [review] Bug 17057 - Remove event attributes from holds template This patch removes event attributes from the holds template. Events are defined instead in the JavaScript. Also changed: Move formatting of hold date to the template; Corrected a non-functional 'cancel hold' link. To test apply the patch and: - Start the process of placing a hold on a single title for a patron. - Uncheck 'Place a hold on the next available item' and try to submit the form without selecting an item. You should be prompted to select an item. - Place a hold on multiple titles at the same time. Confirm that your hold is saved correctly. - View the holds for a title which has multiple holds. - Confirm that clicking the "X" image triggers a confirmation. Test canceling and confirming. - With SuspendHoldsIntranet enabled, select a 'Suspend until' date for any hold and confirm that the corresponding 'Clear date' link works correctly. - Confirm that suspending a hold with and without an expiration date works correctly. - Place an item-level hold. - View the holds for that same title. - Submit another patron to place a new hold. - In the list of items which can be placed on hold, look for the item you place on hold previously. There should be a "Cancel hold" link in the information column. Confirm that this link correctly triggers a confirmation dialog and deletes the hold. Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>
Created attachment 54109 [details] [review] [PASSED QA] Bug 17057 - Remove event attributes from holds template This patch removes event attributes from the holds template. Events are defined instead in the JavaScript. Also changed: Move formatting of hold date to the template; Corrected a non-functional 'cancel hold' link. To test apply the patch and: - Start the process of placing a hold on a single title for a patron. - Uncheck 'Place a hold on the next available item' and try to submit the form without selecting an item. You should be prompted to select an item. - Place a hold on multiple titles at the same time. Confirm that your hold is saved correctly. - View the holds for a title which has multiple holds. - Confirm that clicking the "X" image triggers a confirmation. Test canceling and confirming. - With SuspendHoldsIntranet enabled, select a 'Suspend until' date for any hold and confirm that the corresponding 'Clear date' link works correctly. - Confirm that suspending a hold with and without an expiration date works correctly. - Place an item-level hold. - View the holds for that same title. - Submit another patron to place a new hold. - In the list of items which can be placed on hold, look for the item you place on hold previously. There should be a "Cancel hold" link in the information column. Confirm that this link correctly triggers a confirmation dialog and deletes the hold. Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 92178 [details] [review] Bug 17057: Remove event attributes from holds template My orginal patch for this bug contained a lot of changes made obsolete by Bug 19469, which created holds_table.inc. This new version makes one minor change only to request.tt, adding a class name and removing an onclick attribute. To test, apply the patch and place an item-level hold on a title. Start the process of placing another hold on that item. On the "place hold" screen, in the table of items, you should see a "Cancel hold" link for the item you previously placed on hold. - Click the "Cancel hold" link - Clicking "Cancel" in the confirmation dialog should cancel the operation. - Clicking "OK" should cancel the hold.
Created attachment 92179 [details] [review] Bug 17057: (follow-up) Replace onsubmit attributes This patch removes the "onsubmit" attribute from the place hold form. To test, apply the patch and test placing a hold: Begin the process of placing a hold on a single title. On the place hold screen, uncheck the "Hold next available item" checkbox and click the "Place hold" button. You should be get an alert saying "Please select an item to place a hold." Select an item and click the "Place hold" button again. The hold should be placed. This patch affects the form validation for placing multiple holds, but I don't think the JavaScript ever has a chance to run: The template blocks the user from placing multiple holds if one of the titles has no items.
Created attachment 92293 [details] [review] Bug 17057: Remove event attributes from holds template My orginal patch for this bug contained a lot of changes made obsolete by Bug 19469, which created holds_table.inc. This new version makes one minor change only to request.tt, adding a class name and removing an onclick attribute. To test, apply the patch and place an item-level hold on a title. Start the process of placing another hold on that item. On the "place hold" screen, in the table of items, you should see a "Cancel hold" link for the item you previously placed on hold. - Click the "Cancel hold" link - Clicking "Cancel" in the confirmation dialog should cancel the operation. - Clicking "OK" should cancel the hold. Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Created attachment 92294 [details] [review] Bug 17057: (follow-up) Replace onsubmit attributes This patch removes the "onsubmit" attribute from the place hold form. To test, apply the patch and test placing a hold: Begin the process of placing a hold on a single title. On the place hold screen, uncheck the "Hold next available item" checkbox and click the "Place hold" button. You should be get an alert saying "Please select an item to place a hold." Select an item and click the "Place hold" button again. The hold should be placed. This patch affects the form validation for placing multiple holds, but I don't think the JavaScript ever has a chance to run: The template blocks the user from placing multiple holds if one of the titles has no items. Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Created attachment 92329 [details] [review] Bug 17057: Remove event attributes from holds template My orginal patch for this bug contained a lot of changes made obsolete by Bug 19469, which created holds_table.inc. This new version makes one minor change only to request.tt, adding a class name and removing an onclick attribute. To test, apply the patch and place an item-level hold on a title. Start the process of placing another hold on that item. On the "place hold" screen, in the table of items, you should see a "Cancel hold" link for the item you previously placed on hold. - Click the "Cancel hold" link - Clicking "Cancel" in the confirmation dialog should cancel the operation. - Clicking "OK" should cancel the hold. Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 92330 [details] [review] Bug 17057: (follow-up) Replace onsubmit attributes This patch removes the "onsubmit" attribute from the place hold form. To test, apply the patch and test placing a hold: Begin the process of placing a hold on a single title. On the place hold screen, uncheck the "Hold next available item" checkbox and click the "Place hold" button. You should be get an alert saying "Please select an item to place a hold." Select an item and click the "Place hold" button again. The hold should be placed. This patch affects the form validation for placing multiple holds, but I don't think the JavaScript ever has a chance to run: The template blocks the user from placing multiple holds if one of the titles has no items. Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work! Pushed to master for 19.11.00
Enhancement not pushed to 19.05.x