my $username = $cgi->param('username');
$username =~ s/\s//g; # Remove blanks
my $password = $cgi->param('password');
- my $org_unit = $ctx->{physical_loc} || $ctx->{aou_tree}->()->id;
+ my $org_unit = $cgi->param('home_ou') ||
+ $ctx->{physical_loc} || $ctx->{aou_tree}->()->id;
my $persist = $cgi->param('persist');
# initial log form only
$args->{password} = md5_hex($seed . md5_hex($password));
$response = $U->simplereq(
'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);
+
} else {
- # TODO: ff bits
+
+ $logger->info("FF TPAC login for $username @ $org_unit");
my $seed = $U->simplereq(
- 'open-ils.auth',
- 'open-ils.auth.authenticate.init', $username);
- $args->{password} = md5_hex($seed . md5_hex($password));
+ 'open-ils.actor',
+ 'open-ils.actor.remote.authenticate.init',
+ $username, $org_unit);
+
+ $args->{password} = $seed == -1 ?
+ $password : md5_hex($seed . md5_hex($password));
+
+ $args->{home} = $org_unit;
+ # FF always uses the username field
+ $args->{username} = $args->{barcode} if $args->{barcode};
+
$response = $U->simplereq(
- 'open-ils.auth', 'open-ils.auth.authenticate.complete', $args);
+ 'open-ils.actor',
+ 'open-ils.actor.remote.authenticate.complete', $args);
}
} else {
[% l('Please enter the following information:') %]
<form method='post'>
<div style="float: left; padding-bottom: 10px; margin-right: 40px;">
- <label for='username_field' class="lbl1" >[% l('Library Card Number or Username') %]</label>
+ <label for='home_ou_field' class="lbl1" >[% l('Library') %]</label>
+ <div class="input_bg">
+ [%- org_select_id = 'home_ou_field'; -%]
+ [% PROCESS "opac/parts/org_selector.tt2";
+ INCLUDE build_org_selector name='home_ou'
+ id=org_select_id can_have_users_only=1 %]
+ </div>
+ </div>
+ <div style="float: left;">
+ <label for='username_field' class="lbl1" >[% l('Library Card Number') %]</label>
<div class="input_bg">
<input type='text' id="username_field" name="username" autofocus />
</div>