Bug 20809 - Link patron image to patron image add/edit form
Summary: Link patron image to patron image add/edit form
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 20779
Blocks: 31492
  Show dependency treegraph
 
Reported: 2018-05-23 18:47 UTC by Owen Leonard
Modified: 2023-01-09 12:08 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Screen capture of the edit button interaction (211.39 KB, image/gif)
2018-05-23 18:47 UTC, Owen Leonard
Details
Screenshot of the modal window (94.18 KB, image/png)
2018-05-23 18:54 UTC, Owen Leonard
Details
Screenshot of the modal window with 20779 as a dependency (15.37 KB, image/png)
2018-05-29 14:51 UTC, Owen Leonard
Details
Bug 20809: Link patron image to patron image add/edit form (7.52 KB, patch)
2018-06-11 15:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.69 KB, patch)
2018-08-03 02:17 UTC, Dilan Johnpullé
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.74 KB, patch)
2018-08-03 07:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.93 KB, patch)
2018-08-14 14:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (3.83 KB, patch)
2018-08-14 14:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.62 KB, patch)
2018-09-04 14:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (3.86 KB, patch)
2018-09-04 14:12 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (5.55 KB, patch)
2018-09-12 16:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.25 KB, patch)
2018-09-14 17:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.31 KB, patch)
2018-09-14 19:10 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.91 KB, patch)
2018-11-14 13:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (5.55 KB, patch)
2018-11-14 13:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.31 KB, patch)
2018-11-14 13:48 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 20809: Link patron image to patron image add/edit form (7.98 KB, patch)
2019-01-08 13:41 UTC, Claire Gravely
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 20809: (follow-up) Corrections to CSS and JS (5.62 KB, patch)
2019-01-08 13:41 UTC, Claire Gravely
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 20809: (follow-up) Add missing JS to view log page (1.38 KB, patch)
2019-01-08 13:41 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.98 KB, patch)
2019-01-13 17:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (5.63 KB, patch)
2019-01-13 17:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.37 KB, patch)
2019-01-13 17:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (QA follow-up) Fix missing filters (2.82 KB, patch)
2019-01-13 17:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (7.97 KB, patch)
2019-01-28 13:33 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (5.61 KB, patch)
2019-01-28 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.36 KB, patch)
2019-01-28 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: (QA follow-up) Fix missing filters (2.80 KB, patch)
2019-01-28 13:34 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 20809: Link patron image to patron image add/edit form (8.04 KB, patch)
2019-01-28 13:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (follow-up) Corrections to CSS and JS (5.69 KB, patch)
2019-01-28 13:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (follow-up) Add missing JS to view log page (1.43 KB, patch)
2019-01-28 13:38 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20809: (QA follow-up) Fix missing filters (2.87 KB, patch)
2019-01-28 13:38 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2018-05-23 18:47:37 UTC
Created attachment 75514 [details]
Screen capture of the edit button interaction

The structure of moremember.tt makes it possible to use AJAX to pull just the patron image add/edit form and display it in a modal. I'd like to add a link to the patron image so that the image can be edited from anywhere it displays.
Comment 1 Owen Leonard 2018-05-23 18:54:05 UTC
Created attachment 75515 [details]
Screenshot of the modal window

I'm not crazy about the duplication of the heading. Maybe it's better to have a blank (or nonexistent?) modal header.
Comment 2 Owen Leonard 2018-05-29 14:51:43 UTC
Created attachment 75637 [details]
Screenshot of the modal window with 20779 as a dependency

Adding Bug 20779 as a dependency makes it easier to show a more refined form in the modal.
Comment 3 Owen Leonard 2018-06-11 15:48:00 UTC Comment hidden (obsolete)
Comment 4 Dilan Johnpullé 2018-08-03 02:17:01 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2018-08-03 07:18:28 UTC Comment hidden (obsolete)
Comment 6 Owen Leonard 2018-08-14 14:31:37 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2018-08-14 14:31:43 UTC Comment hidden (obsolete)
Comment 8 Owen Leonard 2018-09-04 14:12:56 UTC Comment hidden (obsolete)
Comment 9 Owen Leonard 2018-09-04 14:12:59 UTC Comment hidden (obsolete)
Comment 10 Cab Vinton 2018-09-06 11:07:33 UTC
Tested in Biblibre Sandbox 14.

Did not see a confirmation dialog when deleting a patron image from several pages. Otherwise patch works as described.

Another suggestion -- Uploading a patron image when an image already exists currently has no effect. Consider changing this to offer the option of replacing the existing image.
Comment 11 Owen Leonard 2018-09-12 16:35:32 UTC Comment hidden (obsolete)
Comment 12 Cab Vinton 2018-09-13 11:13:03 UTC
Tested in Biblibre Sandbox 14.

All works as described, except pressing the Add button has no effect on the patron page showing the Modification log.
Comment 13 Owen Leonard 2018-09-14 17:11:46 UTC Comment hidden (obsolete)
Comment 14 Lucas Gass 2018-09-14 19:10:29 UTC Comment hidden (obsolete)
Comment 15 Caroline Cyr La Rose 2018-09-16 16:21:26 UTC
Is it normal that if we add the image from a page other than patron details (e.g. purchase suggestions) it goes back to patron details and does not stay on the page we were on?
Comment 16 Owen Leonard 2018-09-16 17:55:51 UTC
(In reply to Caroline Cyr La Rose from comment #15)
> Is it normal that if we add the image from a page other than patron details
> (e.g. purchase suggestions) it goes back to patron details and does not stay
> on the page we were on?

It's not ideal, but it is to be expected with my patch. I didn't modify that behavior. If folks feel that it doesn't work this way I can try to fix it.
Comment 17 Caroline Cyr La Rose 2018-09-16 17:59:05 UTC
(In reply to Owen Leonard from comment #16)
> (In reply to Caroline Cyr La Rose from comment #15)
> > Is it normal that if we add the image from a page other than patron details
> > (e.g. purchase suggestions) it goes back to patron details and does not stay
> > on the page we were on?
> 
> It's not ideal, but it is to be expected with my patch. I didn't modify that
> behavior. If folks feel that it doesn't work this way I can try to fix it.

We can report another bug for that.
Comment 18 Owen Leonard 2018-11-14 13:48:42 UTC
Created attachment 82333 [details] [review]
Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Owen Leonard 2018-11-14 13:48:47 UTC
Created attachment 82334 [details] [review]
Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.
Comment 20 Owen Leonard 2018-11-14 13:48:51 UTC
Created attachment 82335 [details] [review]
Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 21 Claire Gravely 2019-01-08 13:41:51 UTC
Created attachment 83711 [details] [review]
[SIGNED-OFF] Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 22 Claire Gravely 2019-01-08 13:41:55 UTC
Created attachment 83712 [details] [review]
[SIGNED-OFF] Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 23 Claire Gravely 2019-01-08 13:41:58 UTC
Created attachment 83713 [details] [review]
[SIGNED-OFF] Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 24 Katrin Fischer 2019-01-13 17:40:39 UTC
There are some complaints from the QA tool:

 FAIL	koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc
   FAIL	  filters
		missing_filter at line 148 (                <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" />)

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
   FAIL	  filters
		missing_filter at line 272 (                                                <div class="hint">To update the image for [% patron.title %] [% patron.firstname | html %] [% patron.surname | html %], select a new image file and click 'Upload.' <br />Click the 'Delete' button to remove the current image.</div>)
Comment 25 Katrin Fischer 2019-01-13 17:55:37 UTC
Created attachment 83844 [details] [review]
Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 26 Katrin Fischer 2019-01-13 17:55:41 UTC
Created attachment 83845 [details] [review]
Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 27 Katrin Fischer 2019-01-13 17:55:45 UTC
Created attachment 83846 [details] [review]
Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 28 Katrin Fischer 2019-01-13 17:55:50 UTC
Created attachment 83847 [details] [review]
Bug 20809: (QA follow-up) Fix missing filters
Comment 29 Katrin Fischer 2019-01-13 17:56:08 UTC
Added the missing filters in a follow-up.
Comment 30 Owen Leonard 2019-01-28 13:33:56 UTC
Created attachment 84477 [details] [review]
Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 31 Owen Leonard 2019-01-28 13:34:00 UTC
Created attachment 84478 [details] [review]
Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 32 Owen Leonard 2019-01-28 13:34:04 UTC
Created attachment 84479 [details] [review]
Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Comment 33 Owen Leonard 2019-01-28 13:34:07 UTC
Created attachment 84480 [details] [review]
Bug 20809: (QA follow-up) Fix missing filters
Comment 34 Katrin Fischer 2019-01-28 13:38:08 UTC
Created attachment 84481 [details] [review]
Bug 20809: Link patron image to patron image add/edit form

This patch modifies an include file so that it is possible with edit a
patron's image on any patron-related page which uses that include.

To test you must have the patronimages system preference enabled.

Apply the patch and open any patron record for viewing.

 - Hover the mouse over the patron image.

   - If the patron has a previously-defined patron image, should you see
     an "Edit" button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

   - If a patron has no patron image defined, you should see an "Add"
     button appear. Clicking the button should display a modal
     dialog titled "Edit patron image." Test that the "Upload,"
     "Delete," and "Cancel" buttons work correctly.

This process should work from any page which shows the patron sidebar:
Check out, Details, Fines, Routing lists, Circulation history, etc.

Patch works as described.

Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>

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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 35 Katrin Fischer 2019-01-28 13:38:12 UTC
Created attachment 84482 [details] [review]
Bug 20809: (follow-up) Corrections to CSS and JS

This follow-up modifies JavaScript so that the confirmation dialog is
triggered when deleting a patron image from the modal window.

The CSS is modified to improve the alignment of patron image and edit
button.

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 36 Katrin Fischer 2019-01-28 13:38:16 UTC
Created attachment 84483 [details] [review]
Bug 20809: (follow-up) Add missing JS to view log page

If the log viewer is being used to track patron-related data the
patron-related JavaScript file should be included.

To test, apply the patch and open a patron record. In the left-hand
sidebar choose Modification Log. Test the patron image edit/replace
process from the patron image in the sidebar and confirm that it works
correctly.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 37 Katrin Fischer 2019-01-28 13:38:20 UTC
Created attachment 84484 [details] [review]
Bug 20809: (QA follow-up) Fix missing filters

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 38 Nick Clemens 2019-02-04 17:43:42 UTC
Awesome work all!

Pushed to master for 19.05
Comment 39 Martin Renvoize 2019-02-11 13:47:22 UTC
Nice enhancement, will not be backported to 18.11.x series.