#1456, automatically suggest user branch as pickup branch

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Paul POULAIN 2007-10-08 14:24:35 -05:00 committed by Joshua Ferraro
parent 1d8f12b9eb
commit 39f88e650f
2 changed files with 11 additions and 2 deletions

View File

@ -139,8 +139,13 @@
<input type="hidden" name="biblioitem" value="<!-- TMPL_VAR NAME="biblioitemnumber" -->" />
<!-- /TMPL_LOOP --> <!-- bibitemloop -->
<p>Pick up from:<select name="branch" id="branch">
<option>-- Please choose your branch --</option>
<!-- TMPL_LOOP NAME="CGIbranch" --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branch" --></option><!-- /TMPL_LOOP -->
<!-- TMPL_LOOP NAME="CGIbranch" -->
<!-- TMPL_IF name="selected" -->
<option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branch" --></option>
<!-- TMPL_ELSE -->
<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branch" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</p>
<input type="submit" value="Place Hold" />

View File

@ -90,6 +90,10 @@ foreach my $branch ( keys %$branches ) {
my %line;
$line{branch} = $branches->{$branch}->{'branchname'};
$line{value} = $branch;
warn "===>".$line{value}." eq ".C4::Context->userenv->{'branch'};
if ($line{value} eq C4::Context->userenv->{'branch'}) {
$line{selected} = 1;
}
push @CGIbranchlooparray, \%line;
}
}