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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Marcel de Rooy 2014-03-19 16:56:23 +01:00 committed by Galen Charlton
parent d60f7c9ab7
commit 6713ec802a
3 changed files with 6 additions and 2 deletions

View File

@ -40,6 +40,7 @@
[% IF errcode==6 %]<div class="alert">Sorry, but you did not enter any valid email address.</div>[% END %]
[% IF errcode==7 %]<div class="alert">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>[% END %]
[% IF errcode==8 %]<div class="alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %]
<p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
[% ELSIF op=='invite' %]
<div id="invite">
@ -57,6 +58,7 @@
</fieldset>
<fieldset class="action">
<input type="submit" value="Send" class="btn" />
<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" class="cancel">Cancel</a>
</fieldset>
</form>
</div>

View File

@ -21,6 +21,7 @@
[% IF errcode==6 %]<div class="dialog alert">Sorry, but you did not enter any valid email address.</div>[% END %]
[% IF errcode==7 %]<div class="dialog alert">Sorry, but we could not accept this key. The invitation may have expired. Contact the patron who sent you the invitation.</div>[% END %]
[% IF errcode==8 %]<div class="dialog alert">As owner of a list you cannot accept an invitation for sharing it.</div>[% END %]
<p><a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves">Return to your lists</a></p>
[% ELSIF op=='invite' %]
<form method="post" onsubmit="return $('#invite_address').val().trim()!='';">
@ -35,6 +36,7 @@
<fieldset class="action">
<input type="submit" value="Send" />
<a href="/cgi-bin/koha/opac-shelves.pl?display=privateshelves" class="cancel">Cancel</a>
</fieldset>
</form>

View File

@ -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
}