Bugzilla – Attachment 166823 Details for
Bug 36877
Patron card creator does not work when editing layout, profile or template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36877: Fix Patron card creator errors on editing layout, profile or template
Bug-36877-Fix-Patron-card-creator-errors-on-editin.patch (text/plain), 4.83 KB, created by
Owen Leonard
on 2024-05-16 12:48:39 UTC
(
hide
)
Description:
Bug 36877: Fix Patron card creator errors on editing layout, profile or template
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2024-05-16 12:48:39 UTC
Size:
4.83 KB
patch
obsolete
>From a9a48012409e7f0f8eabcad00040e2f675d6cf17 Mon Sep 17 00:00:00 2001 >From: Jan Kissig <jkissig@th-wildau.de> >Date: Thu, 16 May 2024 11:23:31 +0200 >Subject: [PATCH] Bug 36877: Fix Patron card creator errors on editing layout, > profile or template > >This patch fixes the unexpected behaviour when clicking on edit layout, >edit profile or edit template in Patron card creator tool. > >Test plans: > >1. edit layout: > > a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout > b) click on edit 'Test Layout' > c) WARNING: An unsupported operation was attempted on layout 20. > Please have your system administrator check the error log for > details. > >apply patch > a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout > b) click on edit 'Test Layout' > c) Edit patron card layout form 20 shows up > >2. edit template and profile: > > a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=template or > http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=profile > b) click edit on an item in the table > c) notice that the forms are empty > >apply patch and redo steps a) and b) to load the edit form > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt | 2 +- > patroncards/edit-layout.pl | 2 +- > patroncards/edit-profile.pl | 2 +- > patroncards/edit-template.pl | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >index f92069a124..bc316d9390 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt >@@ -96,7 +96,7 @@ > [% FOREACH text_field IN table_loo.text_fields %] > [% IF ( text_field.select_field ) %] > <td> >- <a class="btn btn-default btn-xs" href="/cgi-bin/koha/patroncards/edit-[% card_element | html %].pl?op=edit&element_id=[% text_field.field_value | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> >+ <a class="btn btn-default btn-xs" href="/cgi-bin/koha/patroncards/edit-[% card_element | html %].pl?op=edit_form&element_id=[% text_field.field_value | html %]"><i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit</a> > [% IF ( print ) %] > <a class="btn btn-default btn-xs export" data-batch-id="[% text_field.field_value |url %]" href="/cgi-bin/koha/patroncards/print.pl?batch_id=[% text_field.field_value |url %]"><i class="fa-solid fa-share-from-square"></i> Export</a> > [% END %] >diff --git a/patroncards/edit-layout.pl b/patroncards/edit-layout.pl >index 544ee4421e..2bc9d1ea9b 100755 >--- a/patroncards/edit-layout.pl >+++ b/patroncards/edit-layout.pl >@@ -80,7 +80,7 @@ sub _set_selected { > return \@select_list; > } > >-if ($op eq 'cud-edit') { >+if ($op eq 'edit_form') { > warn sprintf("Error performing '%s': No 'layout_id' passed in.", $op) unless ($layout_id); > $layout = C4::Patroncards::Layout->retrieve(layout_id => $layout_id); > $layout_xml = XMLin($layout->get_attr('layout_xml'), ForceArray => 1); >diff --git a/patroncards/edit-profile.pl b/patroncards/edit-profile.pl >index 49dd334bf6..a41529c1b4 100755 >--- a/patroncards/edit-profile.pl >+++ b/patroncards/edit-profile.pl >@@ -45,7 +45,7 @@ my @label_template = (); > > my $units = get_unit_values(); > >-if ($op eq 'cud-edit') { # FIXME This looks like edit_form ? >+if ($op eq 'edit_form') { # FIXME This looks like edit_form ? > $profile = C4::Patroncards::Profile->retrieve(profile_id => $profile_id); > $template_list = get_all_templates({ fields => [ qw( template_id template_code profile_id ) ] }); > } >diff --git a/patroncards/edit-template.pl b/patroncards/edit-template.pl >index dacb4f3366..76901412d7 100755 >--- a/patroncards/edit-template.pl >+++ b/patroncards/edit-template.pl >@@ -45,7 +45,7 @@ my $profile_list = undef; > > my $units = get_unit_values(); > >-if ($op eq 'cud-edit') { # FIXME This looks like edit_form >+if ($op eq 'edit_form') { # FIXME This looks like edit_form > $card_template = C4::Patroncards::Template->retrieve(template_id => $template_id); > $profile_list = get_all_profiles({ fields => [ qw( profile_id printer_name paper_bin ) ], filters => {template_id => [ $template_id, 0 ], creator => 'Patroncards'} } ); > } >-- >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 36877
:
166810
|
166822
|
166823
|
166824
|
166877
|
166878