From 82aa9fe8abb971e04123cff17a105b6bad7aec8e Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 19 Mar 2014 16:56:23 +0100 Subject: [PATCH] Bug 9032: QA Follow-up: Loop variable and Cancel button To satisfy QA needs: Use loop variable instead of $_ in opac-shareshelf.pl 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 --- 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 433b17a..b446252 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 9d00492..074425c 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 9e12266..97fe8b2 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 } -- 1.7.10.4