2 <html lang='[% ctx.locale.replace('_', '-') %]'>
4 <meta charset="utf-8" />
5 <meta http-equiv="X-UA-Compatible" content="IE=edge" />
7 <meta http-equiv="refresh" content="[% ctx.refresh %]" />
8 [% ELSIF ctx.authtime AND !ctx.is_staff %]
9 <meta http-equiv="refresh" content="[% ctx.authtime %]; url=[% ctx.logout_page %]" />
11 <meta name = "viewport" content = "initial-scale = 1.0">
12 <link rel="stylesheet" type="text/css" href="[% ctx.media_prefix %]/css/skin/default/opac/semiauto.css" />
13 <link rel="stylesheet" type="text/css" href="[% ctx.opac_root %]/css/style.css" />
14 <title>[% l('Catalog - [_1]', ctx.page_title) %]</title>
15 <link rel="unapi-server" type="application/xml" title="unAPI" href="/opac/extras/unapi" />
16 <link type="application/opensearchdescription+xml" rel='search' title="[% l('Evergreen OpenSearch') %]" href="/opac/extras/opensearch/1.1/[% ctx.get_aou(ctx.search_ou).shortname %]/-/osd.xml" />
18 <style type="text/css">
19 @import "[% ctx.media_prefix %]/js/dojo/dijit/themes/tundra/tundra.css";
22 [% INCLUDE 'opac/parts/goog_analytics.tt2' %]
23 [% IF myopac_main_page == "payment_form" AND ctx.get_org_setting(ctx.user.home_ou.id, 'opac.processor.stripe.enabled')%]
24 <script type="text/javascript" src="https://js.stripe.com/v2/"></script> <!-- use an ou setting for this url? -->
25 <script type="text/javascript">
26 // This script is only displayed when logged in, so ctx.user.home_ou is always available
27 Stripe.setPublishableKey('[% ctx.get_org_setting(ctx.user.home_ou.id, 'credit.processor.stripe.pubkey') %]');
29 function stripe_onsubmit() {
30 var form = document.getElementById("stripe_form");
31 var button = document.getElementById("payment_submit");
33 button.disabled = true;
35 Stripe.card.createToken(form, stripe_callback);
40 function stripe_callback(status, response) {
41 var form = document.getElementById("payment_form");
42 var button = document.getElementById("payment_submit");
43 var stripe_token = document.getElementById("stripe_token");
46 alert(response.error.message);
47 button.disabled = false;
51 stripe_token.value = response.id; // response.id is the token id, though there are more fields available if needed.
52 form.setAttribute("onsubmit","");
59 <body[% IF want_dojo; ' class="tundra"'; END %]>
60 <h1 class="sr-only">[% l('Catalog') %]</h1>
61 [%#Each content page needs (at minimum) an <h2> describing the content%]
63 <h2 class="sr-only">[% l('Additional Resources') %]</h2>
64 [% INCLUDE 'opac/parts/footer.tt2' %]
65 [% INCLUDE 'opac/parts/js.tt2' %]
66 [%- IF ENV.OILS_CHILIFRESH_ACCOUNT %]
67 [%- INCLUDE 'opac/parts/chilifresh.tt2' %]