There are many uses of "onclick" and other event attributes in the Serials module templates. This bug will track changes to serials-collection.tt and serials-edit.tt
Created attachment 53647 [details] [review] Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates This patch removes the use of event attributes like "onclick" from the serial collection and serial edit templates. Events are now defined in JavaScript. Also changed: Converted "create routing list," "edit routing list," and "Renew" links to Bootstrap buttons. The "select all" and "clear all" links have Font Awesome icons added. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly. - On a subscription which has expired, test that the "Renew" button works correctly. - On the serial collection page, select multiple issues and click the "Edit serials" button. - Testing with a subscription for which an item record is NOT created when receiving: - Changing the status to "Arrived" or "Claimed" should change the "Expected on" date to today's date. Selecting any other status should leave the "expected on" date as it was or return it to its original value. - Test that the "Multi receiving" button works correctly. - Testing with a subscription for which an item record IS created when receiving: - Changing the status of an issue should work as above but should also trigger the appearance of the item add form when the status is "Arrived" or "Claimed," and hide the form otherwise. - Cliking the "Item" link at the top of the item add form should hide it. - Clicking the "Add item" link under any issue should display the item add form. - In the item add form, test that repeatable fields are correctly duplicated when you click the "clone" button. - On the "Supplemental issue" line, changing the status to "Arrived" should work as described above. Changing the status on this line to "Claimed" should only change the "Expected on" date. - Adding regular and supplemental issues should work correctly.
Created attachment 53856 [details] [review] Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates This patch removes the use of event attributes like "onclick" from the serial collection and serial edit templates. Events are now defined in JavaScript. Also changed: Converted "create routing list," "edit routing list," and "Renew" links to Bootstrap buttons. The "select all" and "clear all" links have Font Awesome icons added. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly. - On a subscription which has expired, test that the "Renew" button works correctly. - On the serial collection page, select multiple issues and click the "Edit serials" button. - Testing with a subscription for which an item record is NOT created when receiving: - Changing the status to "Arrived" or "Claimed" should change the "Expected on" date to today's date. Selecting any other status should leave the "expected on" date as it was or return it to its original value. - Test that the "Multi receiving" button works correctly. - Testing with a subscription for which an item record IS created when receiving: - Changing the status of an issue should work as above but should also trigger the appearance of the item add form when the status is "Arrived" or "Claimed," and hide the form otherwise. - Cliking the "Item" link at the top of the item add form should hide it. - Clicking the "Add item" link under any issue should display the item add form. - In the item add form, test that repeatable fields are correctly duplicated when you click the "clone" button. - On the "Supplemental issue" line, changing the status to "Arrived" should work as described above. Changing the status on this line to "Claimed" should only change the "Expected on" date. - Adding regular and supplemental issues should work correctly. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works as described. https://bugs.koha-community.org/show_bug.cgi?id=16692
Created attachment 53884 [details] [review] Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates This patch removes the use of event attributes like "onclick" from the serial collection and serial edit templates. Events are now defined in JavaScript. Also changed: Converted "create routing list," "edit routing list," and "Renew" links to Bootstrap buttons. The "select all" and "clear all" links have Font Awesome icons added. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly. - On a subscription which has expired, test that the "Renew" button works correctly. - On the serial collection page, select multiple issues and click the "Edit serials" button. - Testing with a subscription for which an item record is NOT created when receiving: - Changing the status to "Arrived" or "Claimed" should change the "Expected on" date to today's date. Selecting any other status should leave the "expected on" date as it was or return it to its original value. - Test that the "Multi receiving" button works correctly. - Testing with a subscription for which an item record IS created when receiving: - Changing the status of an issue should work as above but should also trigger the appearance of the item add form when the status is "Arrived" or "Claimed," and hide the form otherwise. - Cliking the "Item" link at the top of the item add form should hide it. - Clicking the "Add item" link under any issue should display the item add form. - In the item add form, test that repeatable fields are correctly duplicated when you click the "clone" button. - On the "Supplemental issue" line, changing the status to "Arrived" should work as described above. Changing the status on this line to "Claimed" should only change the "Expected on" date. - Adding regular and supplemental issues should work correctly. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works as described. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
While testing this bug I came across the fact that in the 'Add Item' form there are no repeatable fields, what "clone" button are you referring to?
Created attachment 59181 [details] [review] Bug 16962 - Remove the use of "onclick" from serial collection and serial edit templates This patch removes the use of event attributes like "onclick" from the serial collection and serial edit templates. Events are now defined in JavaScript. Also changed: Converted "create routing list," "edit routing list," and "Renew" links to Bootstrap buttons. The "select all" and "clear all" links have Font Awesome icons added. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly. - On a subscription which has expired, test that the "Renew" button works correctly. - On the serial collection page, select multiple issues and click the "Edit serials" button. - Testing with a subscription for which an item record is NOT created when receiving: - Changing the status to "Arrived" or "Claimed" should change the "Expected on" date to today's date. Selecting any other status should leave the "expected on" date as it was or return it to its original value. - Test that the "Multi receiving" button works correctly. - Testing with a subscription for which an item record IS created when receiving: - Changing the status of an issue should work as above but should also trigger the appearance of the item add form when the status is "Arrived" or "Claimed," and hide the form otherwise. - Cliking the "Item" link at the top of the item add form should hide it. - Clicking the "Add item" link under any issue should display the item add form. - In the item add form, test that repeatable fields are correctly duplicated when you click the "clone" button. - On the "Supplemental issue" line, changing the status to "Arrived" should work as described above. Changing the status on this line to "Claimed" should only change the "Expected on" date. - Adding regular and supplemental issues should work correctly. Signed-off-by: Frédéric Demians <f.demians@tamil.fr> Works as described. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 67814 [details] Screenshot of formatting issue on serial collection page There is a tiny issue with the table heading on the serials collection page, when a subscription is renewed.
Created attachment 100923 [details] [review] Bug 16962: Remove the use of "onclick" from serial collection template This patch removes the use of event attributes like "onclick" from the serial collection template. Events are now defined in JavaScript. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly and affect only that tab. - On a subscription which has expired, test that the "Renew" button works correctly.
Patch no longer applies 8-(: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 16962: Remove the use of "onclick" from serial collection template Using index info to reconstruct a base tree... M koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-collection.tt error: Failed to merge in the changes. Patch failed at 0001 Bug 16962: Remove the use of "onclick" from serial collection template
Created attachment 102647 [details] [review] Bug 16962: Remove the use of "onclick" from serial collection template This patch removes the use of event attributes like "onclick" from the serial collection template. Events are now defined in JavaScript. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly and affect only that tab. - On a subscription which has expired, test that the "Renew" button works correctly.
Created attachment 103328 [details] [review] Bug 16962: Remove the use of "onclick" from serial collection template This patch removes the use of event attributes like "onclick" from the serial collection template. Events are now defined in JavaScript. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly and affect only that tab. - On a subscription which has expired, test that the "Renew" button works correctly. Signed-off-by: David Nind <david@davidnind.com>
Created attachment 103381 [details] [review] Bug 16962: Remove the use of "onclick" from serial collection template This patch removes the use of event attributes like "onclick" from the serial collection template. Events are now defined in JavaScript. To test, apply the patch and go to Serials - Locate or create a subscription for which an item record is NOT created when receiving. - On the serial collection page for this subscription, test that the "Multi receiving" button works correctly. - For any subscription, test that the "Generate next" button works correctly. - In each tab, test that the "select all" and "clear all" links work correctly and affect only that tab. - On a subscription which has expired, test that the "Renew" button works correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Nice work everyone! Pushed to master for 20.05
enhancement not backported to 19.11.x