From 6713ec802ab38995fa37c78b7ec629ad7732ef2b Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 19 Mar 2014 16:56:23 +0100 Subject: [PATCH] Bug 9032: (follow-up) loop variable and Cancel button [1] Use loop variable instead of $_ in opac-shareshelf.pl [2] Adds Cancel button to Invite form (prog and bootstrap) in opac-shareshelf.tt. Likewise adds Return link under an error message in opac-shareshelf.tt. Signed-off-by: Marcel de Rooy Signed-off-by: Jonathan Druart Signed-off-by: Galen Charlton --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt | 2 ++ koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt | 2 ++ opac/opac-shareshelf.pl | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt index 433b17ab6c..b446252198 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shareshelf.tt @@ -40,6 +40,7 @@ [% IF errcode==6 %]
Sorry, but you did not enter any valid email address.
[% END %] [% IF errcode==7 %]
Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.
[% END %] [% IF errcode==8 %]
As owner of a list you cannot accept an invitation for sharing it.
[% END %] +

Return to your lists

[% ELSIF op=='invite' %]
@@ -57,6 +58,7 @@
+ Cancel
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt index 9d00492b45..074425cac0 100644 --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt +++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-shareshelf.tt @@ -21,6 +21,7 @@ [% IF errcode==6 %]
Sorry, but you did not enter any valid email address.
[% END %] [% IF errcode==7 %]
Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.
[% END %] [% IF errcode==8 %]
As owner of a list you cannot accept an invitation for sharing it.
[% END %] +

Return to your lists

[% ELSIF op=='invite' %]
@@ -35,6 +36,7 @@
+ Cancel
diff --git a/opac/opac-shareshelf.pl b/opac/opac-shareshelf.pl index 9e12266c79..97fe8b29fb 100755 --- a/opac/opac-shareshelf.pl +++ b/opac/opac-shareshelf.pl @@ -283,8 +283,8 @@ sub stringtokey { sub alphabet_ordinal { my ($char, $alphabet) = @_; - for( 0..$#$alphabet ) { - return $_ if $char eq $alphabet->[$_]; + for my $ord ( 0..$#$alphabet ) { + return $ord if $char eq $alphabet->[$ord]; } return ''; #ignore missing chars } -- 2.11.0