53056c18d3d972168e00fa49e5a0cf8e668d4673
[working/Evergreen.git] / Open-ILS / src / templates / kpac / getit.tt2
1 [%  
2     PROCESS "opac/parts/header.tt2";
3     PROCESS "opac/parts/misc_util.tt2"; # MARC 
4     WRAPPER "kpac/parts/subpage.tt2";
5     attrs = {marc_xml => ctx.marc_xml};
6     INCLUDE get_marc_attrs args=attrs;
7     ctx.page_title = attrs.title | html 
8 %]
9
10 <div id="search_results_parent">
11     [% INCLUDE 'kpac/parts/record_row.tt2' rec_id=ctx.bre_id %]
12 </div>
13           
14 <div class="checkout_options">
15     <table cellpadding="0" cellspacing="0" border="0">
16         <tr>
17             <td valign="top" class="left_brain_cell">
18                 <div class="left_brain">
19
20                     [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='card_help' %]
21                         <img src="[% ctx.media_prefix %]/images/kpac/library_card.png[% ctx.cache_key %]" alt="[% l('library card') %]" /></div></td>
22                     [% END %]
23                     [% WRAPPER 'kpac/parts/help_popups.tt2' popup_id='password_help' %]
24                         <p>[% l('Enter your password') %]</p>
25                     [% END %]
26
27                     <div class="top_side">
28                         <h2>[% l('get it!') %]</h2>
29                         <p>[% l('If you would like to place a hold on this item, please enter the ' _
30                             'following information and click Submit below:') %]</p>
31                     </div>
32
33                     <form method='POST'><!-- login + place hold form -->
34
35                         <div class="checkout_box">
36                             <div class="box1_top">&nbsp;</div>
37                             <div class="box_inside">
38
39                                 [% IF !ctx.user %]
40                                     [% seed = l(' Enter Numbers... ') %]
41                                     <p>[% l('Library Card Number without spaces:') %]</p>
42                                     <div class="input_box">
43                                         <input name="username" type="text" class="text_box" style="color:#aaa;" value="[% seed %]" 
44                                             onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
45                                             onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
46                                     </div>
47                                     <a class="help_btn" href="javascript:;" 
48                                         onclick="helpPopup('card_help', this, event);"><img 
49                                         src="[% ctx.media_prefix %]/images/kpac/question_mark.png[% ctx.cache_key %]" alt="[% l('pin number help') %]" /></a>
50
51                                     <div class="clear">&nbsp;</div>
52                                     <div class="hr">&nbsp;</div>
53
54                                     <p>[% l('Password') %]</p>
55                                     <div class="input_box">
56                                         <input name="password" type="password" class="text_box" style="color:#aaa;" value="[% seed %]" 
57                                             onfocus="if(this.value=='[% seed %]'){this.value='';this.style.color='#424242';}" 
58                                             onblur="if(this.value==''){this.value='[% seed %]'; this.style.color='#aaa';}" />
59                                     </div>
60
61                                     <a class="help_btn" href="javascript:;" 
62                                         onclick="helpPopup('password_help', this, event);"><img 
63                                         src="[% ctx.media_prefix %]/images/kpac/question_mark.png[% ctx.cache_key %]" alt="[% l('password help') %]" /></a>
64
65                                     <input type="hidden" name='pickup_lib' value='0' id='pickup_lib'>
66                                     
67                                     <div class="clear">&nbsp;</div>
68                                     <div class="hr">&nbsp;</div>
69
70                                 [% ELSE %]
71
72                                 <p>[% l('Choose a Pickup Library:') %]</p>
73                                 <div class="pickup_lib">
74                                     [%  def_lib = ctx.default_pickup_lib || ctx.physical_loc;
75                                         PROCESS "opac/parts/org_selector.tt2";
76                                         INCLUDE build_org_selector name='pickup_lib' 
77                                         value=def_lib id='pickup_lib' can_have_vols_only=1 hold_pickup_lib=0 %]
78
79                                  <!-- HIDDEN FIELDS FOR DEFAULT NOTIFICATION PREFERENCES -->
80                                  [%- IF ctx.notify_method -%]
81                                      [%- IF ctx.notify_method == '' OR ctx.notify_method == 'phone:email' -%]
82                                          [%- SET ctx.notify_method = 'email|phone' -%]
83                                      [%- END -%]
84                                  [%- ELSE -%]
85                                      [%- SET ctx.notify_method = 'email|phone' -%]
86                                  [%- END -%]
87                                  
88                                  [%- IF ctx.user.email -%]
89                                       [% ctx.notify_method.search('email') ? 
90                                      '<input type="hidden" id="email_notify" name="email_notify" value="t"/>' : '' %]
91                                  [%- END -%]
92
93                                  [%- IF allow_phone_notifications == 'true' -%]
94                                      [% IF ctx.default_phone %]
95                                             [% phone_value = ctx.default_phone %]
96                                      [% ELSE %]
97                                             [% phone_value= ctx.user.day_phone %]
98                                      [% END %]
99                                      
100                                      [% ctx.notify_method.search('phone') ? 
101                                          '<input type="hidden" id="phone_notify_checkbox" name="phone_notify_checkbox" value="t"/>
102                                          <input type="hidden" name="phone_notify" value="' _ phone_value _ '"/>' : '' %]
103                                  [%- END -%]
104
105                                 [% IF ctx.get_org_setting(ctx.search_ou, 'sms.enable') == 1 %]
106                                        [% setting_notify = 'opac.default_sms_notify';
107                                           setting_carrier = 'opac.default_sms_carrier'; %]
108                                        [% ctx.notify_method.search('sms') ?
109                                             '<input type="hidden" id="sms_notify_checkbox" name="sms_notify_checkbox" value="t" />
110                                              <input type="hidden" id="sms_carrier" name="sms_carrier" value="' _ ctx.user_setting_map.$setting_carrier _ '" />
111                                              <input type="hidden" id="sms_notify" name="sms_notify" value="' _ ctx.user_setting_map.$setting_notify _ '" />' : '' %]
112                                  [% END %]                               
113
114                                 </div>
115                                 [% END %]
116                             </div>
117                         </div>
118                         <div class="submit_btn">
119                             <input type='hidden' name='action' value='hold'/>
120                             <input type='image' src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png[% ctx.cache_key %]" alt="[% l('Submit') %]"/>
121                         </div>
122                     </form>
123                 </div>
124             </td>
125
126             <td valign="top">
127                 <div class="right_brain">
128                     <div class="top_side">
129                         <h2>[% l('save it!') %]</h2>
130                         <p>[% l('If you would like to save this item to a list to be requested later, click Submit below.') %]</p>
131                         [% IF ctx.user AND ctx.bookbags AND ctx.bookbags.size > 0 %]
132                         <br/>
133                         <p>
134                             [% l('You may also save this item to a list you have already created by selecting one of your lists below.') %]
135                         </p>
136                         [% END %]
137                     </div>
138                     <form method='POST'>
139                         <input type='hidden' name='action' value='save'/>
140                         [% IF ctx.user AND ctx.bookbags AND ctx.bookbags.size > 0 %]
141                             <div class="checkout_box">
142                                 <div class="box1_top">&nbsp;</div>
143                                 <div class="box_inside">
144                                     <p>[% l('Add to one of your lists?') %]</p>
145                                     <select name='bookbag'>
146                                         <option value='' selected='selected'>[% l('-- Temporary List --') %]</option>
147                                         [% FOR bbag IN ctx.bookbags %]
148                                             <option value="[% bbag.id %]">[% bbag.name | html %]</option>
149                                         [% END %]
150                                     </select>
151                                 </div>
152                             </div>
153                         [% END %]
154                         <div class="submit_btn">
155                             <input type='image' src="[% ctx.media_prefix %]/images/kpac/review_submit_btn.png[% ctx.cache_key %]" alt="[% l('Submit') %]" />
156                         </div>
157                     </div>
158                 </div>
159             </td>
160         </tr>
161     </table>
162 </div>
163
164 <div class="sub_navigation2 checkout">
165     <table cellpadding="0" cellspacing="0" border="0" width="100%">
166         <tr>
167             [%  # in the absence of a sane referer, return to the detail page
168                 url = ctx.kpac_root _ (ctx.referer.match('results') ? '/results' : '/record/' _ ctx.bre_id) %]
169             <td><a href="[% mkurl(url) %]"><img src="[% ctx.media_prefix %]/images/kpac/cancel_back_btn.png[% ctx.cache_key %]" /></a></td>
170             <td width="100%" class="nav_mid_bg">&nbsp;</td>
171         </tr>
172     </table>
173 </div>
174          
175 [% END %]