sub _get_vendor_library {
my $home_ou = @_;
my $object_rdsa;
- my $ebook_rds_req;
+ my $ebook_rdsa_req;
my $pcrud = OpenSRF::AppSession->create('open-ils.pcrud');
$pcrud->connect();
- $ebook_rds_req = $pcrud->request('open-ils.pcrud.search.ebook_rdsa.atomic', "ANONYMOUS",
+ $ebook_rdsa_req = $pcrud->request('open-ils.pcrud.search.ebook_rdsa.atomic', "ANONYMOUS",
{
home_ou => $home_ou,
"+ebook_rds" => {
}
)->gather(1);
- if ($ebook_rds_req && scalar (@$ebook_rds_req) > 0) {
- #read the library.id to find corrosponding library id from digital services atuhorized table
- $object_rdsa = $ebook_rds_req->[0];
+ if ($ebook_rdsa_req && scalar (@$ebook_rdsa_req) > 0) {
+ #read the library.id to find corresponding library id from digital services authorized table
+ $object_rdsa = $ebook_rdsa_req->[0];
}
return $object_rdsa;
$logger->info('EbookAPI: Got patron id: '. $self->ctx->{rbdigital_patron_id});
# Call sub to get all the vendors to be displayed on the UI
$self->ctx->{vendors} = _get_authorized_vendors($self->editor->authtoken, $session_id);
+
+ # Loop through vendors array and get the RBdigital library URL tied to logged in User
+ foreach my $value (@ {$self->ctx->{vendors}}) {
+ if ($value->vendor_key eq 'rbdigital') {
+ $self->ctx->{vendor_library_url} = $value->[0]->digital_services_library_url;
+ last;
+ }
+ }
+
$self->ctx->{wishlist} = _get_patron_wishlist($self->editor->authtoken, $session_id);
} else {
$self->ctx->{rbdigital_patron_id} = 0;
IF ctx.result_stop > ctx.hit_count; ctx.result_stop = ctx.hit_count; END;
result_count = ctx.result_start;
- USE Dumper;
%]
[% PROCESS "opac/parts/result/paginate.tt2" %]
[% ctx.results_count_header = PROCESS results_count_header;
</div>
<div id="confirmPasswordError" class="hidden alert alert-danger">Confirm password must match with the password you entered.</div>
<div class="form-group">
- <label for="email"><span class="glyphicon glyphicon-envelope"></span> Email</label>
- <input type="email" class="form-control" id="email" placeholder="Enter email" value="[% ctx.user.email | html; %]"
- data-toggle="tooltip" data-placement="right" title="Note: Changing your email here will also update your account's email address." required>
+ <label for="email"><span class="glyphicon glyphicon-envelope"></span>RBdigital Email</label>
+ <input type="email" class="form-control" id="email" placeholder="Enter RBdigital email" value="[% ctx.user.email | html; %]"
+ data-toggle="tooltip" data-placement="right" title="Note: Changing your email here will also update your library account's email address." required>
</div>
<button id="btnRegister" type="submit" class="btn btn-success pull-left"><span class="glyphicon glyphicon-off"></span> Register</button>
<span class="pull-right"><img src="[% ctx.media_prefix %]/images/rbdigital_logo.png[% ctx.cache_key %]" alt="[% l("RBDigital") %]"/></span>
</div>
</div>
-
</div>
</div>
<!-- Modal for Registration Success -->
<div id="rbdigitalRegisterSuccess" class="modal fade" role="dialog">
<div class="modal-dialog">
- <!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
- <h4><span class="glyphicon glyphicon-lock"></span>RBDigital - Registration Success</h4>
+ <h4>Congratulations!</h4>
</div>
<div class="modal-body">
- <div class="alert alert-success">
- <strong>Success!</strong> You have been successfully registered with RBDigital.
+ <div class="center-text">
+ Your RBdigital account has been created!<br><br>
+ Please remember the RBdigital password you just created. It may be different from your PINES password.<br><br>
+ Visit <a href="https://[% vendor_library_url %]">https://[% vendor_library_url %]</a>/#/help/support to learn about RBdigital and to download RBdigital mobile and desktop apps.<br><br>
+ Visit <a href="https://[% vendor_library_url %]">https://[% vendor_library_url %]</a> to search for e-books and e-audiobooks at RBdigital.com or use the RBdigital tab to search from them from this PINES site
</div>
- <button id="btnCloseRegisterSuccess" type="submit" class="btn btn-danger btn-default pull-right" data-dismiss="modal"><span class="glyphicon glyphicon-remove"></span> Close</button>
+ <button id="btnCloseRegisterSuccess" type="submit" class="btn btn-danger btn-default pull-right" data-dismiss="modal">Ok</button>
</div>
</div>
</div>
IF vendor.vendor_key == 'default';
vendor_search_url = ctx.opac_root _ vendor.search_uri;
END;
+ IF vendor.vendor_key == 'rbdigital';
+ # vendor_library_url = vendor.digital_services_library_url;
+ END;
%]
<a id="lnkSearchResults_[% vendor.vendor_key %]"
href="[% vendor_search_url; %]" class="[% vendor_tab_class %]">[% vendor.name %]</a>
<input type="hidden" id="rbdigitalPatronId" value="[% ctx.rbdigital_patron_id %]">
[% IF ctx.rbdigital_patron_id == 0; %]
<!-- Load Code for displaying the password prompt -->
- [% INCLUDE 'opac/ebook_api/rbdigital/register_modal.tt2'; %]
+ [% INCLUDE 'opac/ebook_api/rbdigital/register_modal.tt2' vendor_library_url = ctx.vendor_library_url; %]
[% END; %]
[% ELSIF ctx.vendors.size > 0; %]
<!-- Read the first vendor name based on the display_order to non-logged in users -->
color: #FFFFFF;
border: 1px solid green;
padding: 10px;
- font-size: 11px;
+ font-size: 12px;
width: 600px;
}
+
/* Tooltip on top */
.rbdigital .tooltip.top > .tooltip-arrow {
border-top: 5px solid green;
.rbdigital_lowhits_help > div {
margin-top: 1em;
+}
+
+.rbdigital #rbdigitalRegisterSuccess .modal-body {
+ padding-top: 15px;
+}
+
+.rbdigital .center-text {
+ text-align: center;
}
\ No newline at end of file