]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/xul/staff_client/server/patron/bill_cc_info.xul
a59e8646313b4663c11670add95eca859e8ba72b
[Evergreen.git] / Open-ILS / xul / staff_client / server / patron / bill_cc_info.xul
1 <?xml version="1.0"?>
2 <!-- Application: Evergreen Staff Client -->
3 <!-- Screen: Patron Display -->
4
5 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
6 <!-- STYLESHEETS -->
7 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
8 <?xml-stylesheet href="chrome://open_ils_staff_client/skin/global.css" type="text/css"?>
9 <?xml-stylesheet href="/xul/server/skin/global.css" type="text/css"?>
10 <?xml-stylesheet href="/xul/server/skin/patron_display.css" type="text/css"?>
11
12 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
13 <!-- LOCALIZATION -->
14 <!DOCTYPE window PUBLIC "" ""[
15         <!--#include virtual="/opac/locale/en-US/lang.dtd"-->
16 ]>
17
18 <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
19 <!-- OVERLAYS -->
20 <?xul-overlay href="/xul/server/OpenILS/util_overlay.xul"?>
21
22 <window id="patron_bill" title="CC Info"
23         orient="vertical" style="overflow: auto"
24         onload="try{info_init(); font_helper();}catch(E){alert(E);}"
25         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
26
27         <!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
28         <!-- BEHAVIOR -->
29         <script type="text/javascript">var myPackageDir = 'open_ils_staff_client'; var IAMXUL = true; var g = {};</script>
30         <scripts id="openils_util_scripts"/>
31
32         <script type="text/javascript" src="/xul/server/main/JSAN.js"/>
33
34         <script>
35         <![CDATA[
36
37                 function info_init() {
38                         netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
39                         if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); }
40                         JSAN.errorLevel = "die"; // none, warn, or die
41                         JSAN.addRepository('/xul/server/');
42                         JSAN.use('util.error'); g.error = new util.error();
43                         g.error.sdump('D_TRACE','my_init() for patron_display.xul');
44                         g.OpenILS = {}; JSAN.use('OpenILS.data'); g.OpenILS.data = new OpenILS.data();
45                         g.OpenILS.data.init({'via':'stash'});
46                         g.payment_blob = { 'cancelled' : true };
47                         g.OpenILS.data.temp = js2JSON( g.payment_blob );
48                         g.OpenILS.data.stash('temp');
49
50                         document.getElementById('cc_number').focus();
51                 }
52
53                 function info_finish() {
54                         /* FIXME -- need unique temp space name */
55                         delete( g.payment_blob.cancelled );
56                         g.OpenILS.data.temp = js2JSON( g.payment_blob );
57                         g.OpenILS.data.stash('temp');
58                 }
59
60         ]]>
61         </script>
62
63
64         <groupbox>
65                 <caption label="Credit Card Info"/>
66                 <grid>
67                         <columns> <column flex="0" /> <column flex="0" /> </columns>
68                         <rows>
69                                 <row>
70                                         <label value="CC Type"/>
71                                         <menulist id="cc_type" oncommand="g.payment_blob.cc_type = this.value;">
72                                                 <menupopup>
73                                                         <menuitem label="Visa" value="Visa"/>
74                                                         <menuitem label="Mastercard" value="Mastercard"/>
75                                                         <menuitem label="American Express" value="American Express"/>
76                                                         <menuitem label="Discover" value="Discover"/>
77                                                         <menuitem label="Other" value="Other"/>
78                                                 </menupopup>
79                                         </menulist>
80                                 </row>
81                                 <row>
82                                         <label value="CC Number"/>
83                                         <textbox id="cc_number" onchange="g.payment_blob.cc_number = event.target.value"/>
84                                 </row>
85                                 <row>
86                                         <label value="Expire Month"/>
87                                         <textbox id="expire_month" onchange="g.payment_blob.expire_month = event.target.value"/>
88                                 </row>
89                                 <row>
90                                         <label value="Expire Year"/>
91                                         <textbox id="expire_year" onchange="g.payment_blob.expire_year = event.target.value"/>
92                                 </row>
93                                 <row>
94                                         <label value="Approval Code"/>
95                                         <textbox id="approval_code" onchange="g.payment_blob.approval_code = event.target.value"/>
96                                 </row>
97                                 <row>
98                                         <label value="Note"/>
99                                         <textbox id="note" onchange="g.payment_blob.note = event.target.value" multiline="true"/>
100                                 </row>
101                         </rows>
102                 </grid>
103                 <hbox>
104                         <spacer flex="1"/>
105                         <button label="Cancel" oncommand="window.close()" accesskey="C"/>
106                         <button label="Submit this Info" oncommand="info_finish(); window.close();" accesskey="S"/>
107                 </hbox>
108         </groupbox>
109
110 </window>
111
112