#!/usr/bin/perl

#use utf8;
use strict;
use CGI;

use Opals::Context;
use Opals::Template qw(
    tmpl_read
    tmpl_write
    tmpl_preference
);

use Opals::Permission qw(
    permission_getList
    permission_getDefaultPermission

);
use Opals::Locale qw(
    loc_getMsgFile
    loc_write
);



my $dbh = Opals::Context->dbh();
END { $dbh->disconnect(); }

my $cgi = CGI->new;
my ($permission, $cookie, $template) = tmpl_read(
        {
            dbh             => $dbh,
            cgi             => $cgi,
            tmplFile        => 'user/addQE.tmpl',
            reqPermission   => 'user_add',
        }
);

my $input = $cgi->Vars();
my $pref = tmpl_preference($dbh);

my $libType = $pref->{'libraryType'} || 'k-12';

if ($permission && $permission->{'user_add'}) {
  # Tue, May 03, 2011 @ 14:20:35 EDT
    
    $template->param(qeUserForm=>1);
  }
$template->param(hlpUrl     => Opals::Constant->getHlpUrl('quickadd') );
$template->param(quickBorrowerEntry => 1,
                  libType=>$libType);
#Thu, Jan 07, 2010 @ 13:50:35 EST
my $msgValMap ={};
my $msgMap            =loc_getMsgFile('user/userInfo.msg',$msgValMap);
loc_write($template,$msgMap);
tmpl_write($dbh, $cgi, $cookie, $template);
