Description
Owen Leonard
2016-02-23 19:21:29 UTC
Created attachment 48319 [details] [review] Bug 15887 - Revise layout and behavior of item search fields management This patch adds some JavaScript to the item search fields management page so that the add form is not displayed by default. This simplifies the interface and makes it more consistent with other similar interfaces. Also changed in this patch: - Changing instances of "Items search fields" to "Item search fields." - Correct form structure to use ordered list - Add "required" classes and enable built-in JS form validation. - Add explicitly labeled "Choose" options to <select>s. - Add missing ids to form fields (labels don't work without them). - Correct classes of message and alert dialogs. - Add JS confirmation of deletions. - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384). To test, apply the patch and go to Administration. - Confirm that the "Item search fields" link is correct. - Follow the link and confirm that the list of existing fields is shown by default, or a message saying there are no existing fields. - Click the "New search field" button and confirm that it displays the entry form. - Confirm that submitting an empty form does not work. - Confirm that clicking the "Cancel" link correctly hides the form. - Confirm that submitting valid data works correctly. - In the table of existing item search fields, confirm that the "Edit" button works correctly. - Confirm that submitting edits works correctly. - In the table of existing item search fields, confirm that clicking "Delete" highlights the row in question and a confirmation dialog appears. - Test both canceling and confirming deletion. Created attachment 48335 [details] [review] [SIGNED-OFF]Bug 15887: Revise layout and behavior of item search fields management This patch adds some JavaScript to the item search fields management page so that the add form is not displayed by default. This simplifies the interface and makes it more consistent with other similar interfaces. Also changed in this patch: - Changing instances of "Items search fields" to "Item search fields." - Correct form structure to use ordered list - Add "required" classes and enable built-in JS form validation. - Add explicitly labeled "Choose" options to <select>s. - Add missing ids to form fields (labels don't work without them). - Correct classes of message and alert dialogs. - Add JS confirmation of deletions. - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384). To test, apply the patch and go to Administration. - Confirm that the "Item search fields" link is correct. - Follow the link and confirm that the list of existing fields is shown by default, or a message saying there are no existing fields. - Click the "New search field" button and confirm that it displays the entry form. - Confirm that submitting an empty form does not work. - Confirm that clicking the "Cancel" link correctly hides the form. - Confirm that submitting valid data works correctly. - In the table of existing item search fields, confirm that the "Edit" button works correctly. - Confirm that submitting edits works correctly. - In the table of existing item search fields, confirm that clicking "Delete" highlights the row in question and a confirmation dialog appears. - Test both canceling and confirming deletion. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described. JSHint OK, koha-qa OK. Hi Owen Good Job. Looks much better. Just one comment, this page does not have help page. Add here Nicole. Entering a new bug for the documentation issue. > - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384).
Could you please revert this change?
Before this patch, we had a validation on the MARC field values, now we don't.
What happens if we enter 10 instead of 010, does it still work?
I think we should add a validation on this form, but it's outside the scope of this patch.
(In reply to Jonathan Druart from comment #6) > > - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384). > > I think we should add a validation on this form, but it's outside the scope > of this patch. I think you're right that I'm pushing the limit on scope here, but I wonder if it isn't better for now to allow free entry on the form fields given the fact that in its current state there are some entries which cannot be made at all? Cait's comment on Bug 15384: > the subfield list is missing capital letters as often used for > additional item fields. If that doesn't sound like a good enough reason I'm happy to revise the patch. (In reply to Owen Leonard from comment #7) > Cait's comment on Bug 15384: > > > the subfield list is missing capital letters as often used for > > additional item fields. > > If that doesn't sound like a good enough reason I'm happy to revise the > patch. The main reason to move it to its own bug report is that the fix could be backported to stable branches. If it is embedded to this patch (enh), it won't be easy. Created attachment 48515 [details] [review] Bug 15887: Revise layout and behavior of item search fields management This patch adds some JavaScript to the item search fields management page so that the add form is not displayed by default. This simplifies the interface and makes it more consistent with other similar interfaces. Also changed in this patch: - Changing instances of "Items search fields" to "Item search fields." - Correct form structure to use ordered list - Add "required" classes and enable built-in JS form validation. - Add explicitly labeled "Choose" options to <select>s. - Add missing ids to form fields (labels don't work without them). - Correct classes of message and alert dialogs. - Add JS confirmation of deletions. - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384). To test, apply the patch and go to Administration. - Confirm that the "Item search fields" link is correct. - Follow the link and confirm that the list of existing fields is shown by default, or a message saying there are no existing fields. - Click the "New search field" button and confirm that it displays the entry form. - Confirm that submitting an empty form does not work. - Confirm that clicking the "Cancel" link correctly hides the form. - Confirm that submitting valid data works correctly. - In the table of existing item search fields, confirm that the "Edit" button works correctly. - Confirm that submitting edits works correctly. - In the table of existing item search fields, confirm that clicking "Delete" highlights the row in question and a confirmation dialog appears. - Test both canceling and confirming deletion. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described. JSHint OK, koha-qa OK. Revision per QA: Undid the change making tag and subfield inputs text fields. Sorry - I think I was to blame here! Created attachment 48539 [details] [review] Bug 15887: Revise layout and behavior of item search fields management This patch adds some JavaScript to the item search fields management page so that the add form is not displayed by default. This simplifies the interface and makes it more consistent with other similar interfaces. Also changed in this patch: - Changing instances of "Items search fields" to "Item search fields." - Correct form structure to use ordered list - Add "required" classes and enable built-in JS form validation. - Add explicitly labeled "Choose" options to <select>s. - Add missing ids to form fields (labels don't work without them). - Correct classes of message and alert dialogs. - Add JS confirmation of deletions. - Convert MARC tag and subfield dropdowns to regular inputs (Bug 15384). To test, apply the patch and go to Administration. - Confirm that the "Item search fields" link is correct. - Follow the link and confirm that the list of existing fields is shown by default, or a message saying there are no existing fields. - Click the "New search field" button and confirm that it displays the entry form. - Confirm that submitting an empty form does not work. - Confirm that clicking the "Cancel" link correctly hides the form. - Confirm that submitting valid data works correctly. - In the table of existing item search fields, confirm that the "Edit" button works correctly. - Confirm that submitting edits works correctly. - In the table of existing item search fields, confirm that clicking "Delete" highlights the row in question and a confirmation dialog appears. - Test both canceling and confirming deletion. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Works as described. JSHint OK, koha-qa OK. Revision per QA: Undid the change making tag and subfield inputs text fields. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Pushed to Mater - Should be in the May 2016 Release. thanks! |