Bug 20969

Summary: Use modal to add and edit notes from basket
Product: Koha Reporter: Owen Leonard <oleonard>
Component: AcquisitionsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: charles.farmer, josef.moravec, katrin.fischer, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21004
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Screenshot showing note edit form in modal
Bug 20969: Use modal to add and edit notes from basket
Bug 20969: Use modal to add and edit notes from basket
Bug 20969: (follow-up) Move focus to textarea whe modal is shown
Bug 20969: (follow-up) Move focus to textarea whe modal is shown
Bug 20969: Use modal to add and edit notes from basket
Bug 20969: Use modal to add and edit notes from basket
Bug 20969: (follow-up) Move focus to textarea whe modal is shown

Description Owen Leonard 2018-06-20 12:27:58 UTC
Created attachment 76211 [details]
Screenshot showing note edit form in modal

When looking at orders in a basket, each order has links to add or edit vendor and internal notes. I propose that we move a copy of the notes edit form to the basket template so that a modal can be used to edit notes.
Comment 1 Owen Leonard 2018-06-20 12:41:00 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2018-06-25 21:09:08 UTC
1) Would it be possible to put the focus in the new input field after clicking on the link? I think it would improve usability to immediately allow typing the note instead of having to click again. But I notice it's the same for the message modal on the patron record.

2) Do you plan on changing the links on the parcel.pl page too? (new bug?)
Comment 3 Katrin Fischer 2018-06-25 21:10:32 UTC
Created attachment 76422 [details] [review]
Bug 20969: Use modal to add and edit notes from basket

This patch modifies the acquisitions basket page so that links to add or
edit vendor or internal notes trigger a modal with the notes edit form
instead of redirecting to a different page. This is a markup change only
-- The form still submits to modordernotes.pl.

To test, apply the patch and view a basket in acquisitions which has
multiple orders. Test various note controls:  Add internal note, Add
vendor note, Edit internal note, edit vendor note.

Confirm that the operations work correctly with multiple orders in the
basket.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Owen Leonard 2018-06-26 13:44:05 UTC
Created attachment 76438 [details] [review]
Bug 20969: (follow-up) Move focus to textarea whe modal is shown

This follow-up adds code to move the mouse cursor to the modal window's
textarea when the modal is displayed.

To test, apply the patch and test the process of adding/editing notes on
an order. Confirm that the focus moves to the textarea when the note
editor modal window is shown.
Comment 5 Katrin Fischer 2018-06-26 21:48:43 UTC
Created attachment 76474 [details] [review]
Bug 20969: (follow-up) Move focus to textarea whe modal is shown

This follow-up adds code to move the mouse cursor to the modal window's
textarea when the modal is displayed.

To test, apply the patch and test the process of adding/editing notes on
an order. Confirm that the focus moves to the textarea when the note
editor modal window is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2018-06-26 21:49:57 UTC
Thx, Owen!
Comment 7 Charles Farmer 2018-06-29 21:11:08 UTC Comment hidden (obsolete)
Comment 8 Charles Farmer 2018-06-29 21:11:29 UTC
Created attachment 76596 [details] [review]
Bug 20969: Use modal to add and edit notes from basket

This patch modifies the acquisitions basket page so that links to add or
edit vendor or internal notes trigger a modal with the notes edit form
instead of redirecting to a different page. This is a markup change only
-- The form still submits to modordernotes.pl.

To test, apply the patch and view a basket in acquisitions which has
multiple orders. Test various note controls:  Add internal note, Add
vendor note, Edit internal note, edit vendor note.

Confirm that the operations work correctly with multiple orders in the
basket.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 9 Charles Farmer 2018-06-29 21:11:34 UTC
Created attachment 76597 [details] [review]
Bug 20969: (follow-up) Move focus to textarea whe modal is shown

This follow-up adds code to move the mouse cursor to the modal window's
textarea when the modal is displayed.

To test, apply the patch and test the process of adding/editing notes on
an order. Confirm that the focus moves to the textarea when the note
editor modal window is shown.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>
Comment 10 Katrin Fischer 2018-06-29 21:23:43 UTC
Reganing my QA token with Charles' additional sign-off - switching this to PQA.off I
Comment 11 Nick Clemens (kidclamp) 2018-07-06 14:43:53 UTC
Awesome work all!

Pushed to master for 18.11
Comment 12 Martin Renvoize 2018-07-10 07:02:32 UTC
Enhancement, not backporting to the 18.05.x series.