#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:
parent
1d8f12b9eb
commit
39f88e650f
|
|
@ -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" />
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue