Bugzilla – Attachment 169766 Details for
Bug 37489
Cannot delete patron image without uploading a file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37489: Separate forms for uploading and deleting a patron image
Bug-37489-Separate-forms-for-uploading-and-deletin.patch (text/plain), 3.40 KB, created by
Roman Dolny
on 2024-07-26 16:54:50 UTC
(
hide
)
Description:
Bug 37489: Separate forms for uploading and deleting a patron image
Filename:
MIME Type:
Creator:
Roman Dolny
Created:
2024-07-26 16:54:50 UTC
Size:
3.40 KB
patch
obsolete
>From 023b3564f959c2126d9d05582cd29eae38e2b607 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Fri, 26 Jul 2024 16:17:56 +0000 >Subject: [PATCH] Bug 37489: Separate forms for uploading and deleting a patron > image > >This patch creats a new form for image deletion that is submitted via the 'Delete' button on the modal. > >To test: >1) Turon on the 'patronimages' sys pref >2) Visit a patron page, you should see an image module on the left. >3) Click on the image to edit it. Upload a new image. >4) Edit the image again, press delete and confirm the popup. >5) Note that it will not let you delete because of the required file. >6) Apply patch >7) Attempt to delete again, this time it is successful. > >Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> >--- > .../intranet-tmpl/prog/en/includes/circ-menu.inc | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >index 9c6d83ea4e..7cfafd54e0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -293,11 +293,19 @@ > <input type="hidden" id="cardnumber" name="cardnumber" value="[% patron.cardnumber | html %]" /> > <input type="hidden" id="borrowernumber" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> > <button type="submit" class="btn btn-default btn-xs" name="op" value="cud-Upload"><i class="fa fa-upload"></i> Upload photo</button> >- [% IF ( patron.image ) %] >- <button id="delpicture" type="submit" class="btn btn-default btn-xs delete" name="op" value="cud-Delete"><i class="fa fa-trash-can"></i> Delete</button> >- [% END %] > </div> <!-- /.action --> > </form> <!-- /#picture-upload --> >+ [% IF ( patron.image ) %] >+ <form method="post" id="picture-delete" action="/cgi-bin/koha/tools/picture-upload.pl" enctype="multipart/form-data"> >+ <div class="action" style="padding-top:0px;"> >+ [% INCLUDE 'csrf-token.inc' %] >+ <input type="hidden" id="image" name="filetype" value="image" /> >+ <input type="hidden" id="cardnumber" name="cardnumber" value="[% patron.cardnumber | html %]" /> >+ <input type="hidden" id="borrowernumber" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> >+ <button id="delpicture" type="submit" class="btn btn-default btn-xs delete" name="op" value="cud-Delete"><i class="fa fa-trash-can"></i> Delete</button> >+ </div> <!-- /.action --> >+ </form> <!-- /#picture-delete --> >+ [% END %] > </div> <!-- /#upload-patron-image --> > <div id="capture-patron-image" class="patroninfo-section"> > <h5>Take patron photo</h5> >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37489
:
169754
|
169766
|
169803