Bugzilla – Attachment 162870 Details for
Bug 36243
ILL "Edit request" action is broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36243: Update edit_action to cud-edit_action
Bug-36243-Update-editaction-to-cud-editaction.patch (text/plain), 3.24 KB, created by
Martin Renvoize (ashimema)
on 2024-03-07 09:43:47 UTC
(
hide
)
Description:
Bug 36243: Update edit_action to cud-edit_action
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-07 09:43:47 UTC
Size:
3.24 KB
patch
obsolete
>From b17e8a0a6a912d2a55f99cd0d6d13cf4d106af1e Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Wed, 6 Mar 2024 12:45:09 +0000 >Subject: [PATCH] Bug 36243: Update edit_action to cud-edit_action > >1) Install FreeForm, enable ILL module, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) You'll have to switch the FreeForm branch to the one compatible with this work, i.e.: >cd /kohadevbox/koha/Koha/Illbackends/FreeForm >git checkout b_36243 >3) Restart plack: >koha-plack --restart kohadev >4) Create a new FreeForm request, visit: ><staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=FreeForm >5) Set 'type' enter '42' in cardnumber and pick a library. Click 'Create'. >6) Edit that request, click "manage request" or if #1 visit: ><staff_url>/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1 >7) Click "Edit request". Click "Submit". Notice it errors "No CSRF token passed for POST" >9) Apply patches. Restart plack. >10) Repeat 7) > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Illrequest.pm | 1 + > ill/ill-requests.pl | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- > 3 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/Koha/Illrequest.pm b/Koha/Illrequest.pm >index bf3f9c3a525..11cfb0f784c 100644 >--- a/Koha/Illrequest.pm >+++ b/Koha/Illrequest.pm >@@ -2054,6 +2054,7 @@ sub get_op_param_deprecation { > } elsif ( $interface eq 'intranet' ) { > $op = $params->{op} // $params->{method} // 'illlist'; > $op = 'cud-create' if $op eq 'create'; >+ $op = 'cud-edit_action' if $op eq 'edit_action'; > $op = 'cud-cancel' if $op eq 'cancel'; > $op = 'cud-delete' if $op eq 'delete'; > } >diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl >index d923a662199..2e170b6f829 100755 >--- a/ill/ill-requests.pl >+++ b/ill/ill-requests.pl >@@ -215,7 +215,7 @@ if ( $backends_available ) { > # handle special commit rules & update type > handle_commit_maybe($backend_result, $request); > >- } elsif ( $op eq 'edit_action' ) { >+ } elsif ( $op eq 'cud-edit_action' ) { > # Handle edits to the Illrequest object. > # (not the Illrequestattributes) > # We simulate the API for backend requests for uniformity. >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 01ec9a0b3ec..8be24b166b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -491,7 +491,7 @@ > </ol> > </fieldset> > <fieldset class="action"> >- <input type="hidden" value="edit_action" name="op"> >+ <input type="hidden" value="cud-edit_action" name="op"> > <input type="hidden" value="form" name="stage"> > <input type="hidden" value="[% request.illrequest_id | html %]" name="illrequest_id"> > <input type="submit" class="btn btn-primary" value="Submit" /> >-- >2.44.0
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 36243
:
162832
|
162833
|
162869
| 162870