From af288205f50af3f49448569e7fb38bae6f2c615f Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 24 Jul 2008 18:24:41 -0500 Subject: [PATCH] kohabug 2154 Modifying form input controls to accomodate translations Due to the logic of the underlying picture-upload.pl depending upon the "value" of the form input controls and this value being translated, the script then failed to function. This patch changes the input controls so that this should not be an issue. This issue should be kept in mind, though, so that it can be avoided in the future. Signed-off-by: Galen Charlton Signed-off-by: Joshua Ferraro --- .../intranet-tmpl/prog/en/modules/members/moremember.tmpl | 5 +++-- .../intranet-tmpl/prog/en/modules/tools/picture-upload.tmpl | 5 +++-- tools/picture-upload.pl | 6 ++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl index 75b8b7df05..0da1c48d9c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl @@ -218,8 +218,9 @@ if (nodename =="barcodes[]"){
- - + + + &borrowernumber=" class="delete">Delete
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tmpl index beaaac5e4b..7bb47b3d58 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tmpl @@ -100,8 +100,9 @@
- - + + + Cancel
diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index 695adb3aaf..6f29eaadac 100755 --- a/tools/picture-upload.pl +++ b/tools/picture-upload.pl @@ -52,7 +52,7 @@ my $op = $input->param('op'); # Other parts of this code could be optimized as well, I think. Perhaps the file upload could be done with YUI's upload # coded. -fbcit -$debug and warn "Params are: filetype=$filetype, cardnumber=$cardnumber, uploadfile=$uploadfilename"; +$debug and warn "Params are: filetype=$filetype, cardnumber=$cardnumber, borrowernumber=$borrowernumber, uploadfile=$uploadfilename"; =head1 NAME @@ -140,11 +140,9 @@ if ( ($op eq 'Upload') && $uploadfile ) { # Case is important in these ope $template->param(filetype => $filetype); } elsif ( $op eq 'Delete' ) { my $dberror = RmPatronImage($cardnumber); + $debug and warn "Patron image deleted for $cardnumber"; warn "Database returned $dberror" if $dberror; -} elsif ( $op eq 'Cancel' ) { - print $input->redirect ("/cgi-bin/koha/tools/picture-upload.pl"); } - if ( $borrowernumber && !$errors && !$template->param('ERRORS') ) { print $input->redirect ("/cgi-bin/koha/members/moremember.pl?borrowernumber=$borrowernumber"); } else { -- 2.39.5