aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/etherpad/src/templates/store/eepnet-checkout
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/etherpad/src/templates/store/eepnet-checkout')
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs183
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs119
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs38
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs33
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs40
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs33
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs43
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs91
-rw-r--r--trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs41
9 files changed, 621 insertions, 0 deletions
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs
new file mode 100644
index 0000000..69e0ead
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/billing-info.ejs
@@ -0,0 +1,183 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><%
+ if (!cart.billingCountry) {
+ cart.billingCountry = "US";
+ }
+ helpers.includeJQuery();
+ helpers.includeJs("billing_shared.js");
+ helpers.includeJs("billing.js");
+
+ function classesPlusError(classes, id) {
+ return (classes || []).concat(errorIfInvalid(id) || []).join(' ');
+ }
+%>
+
+<% function textRow(id, label, classes, notBillingField) {
+ var val = (cart[id] || "");
+ var maxlen=60;
+ var border;
+ if (id == "billingCCNumber") {
+ if (billing.validateCcNumber(val)) {
+ border = "greenborder";
+ } else if (billing.validateCcLength(val)) {
+ border = "redborder";
+ }
+ val = obfuscateCC(val);
+ maxlen = 16;
+ }
+ var classString = classesPlusError((notBillingField?[]:['billingfield']).concat(classes), id);
+ return TR({className: classString},
+ TD({className: 'pcell'},
+ LABEL({htmlFor: id}, label+(label.length > 0 ? ":" : ''))),
+ TD({className: 'tcell'},
+ INPUT({type: 'text', name: id, size:35, maxlength:maxlen,
+ value: val,
+ className: border})));
+ } %>
+
+<h4>Your name:</h4>
+<table class="billingtable">
+ <%= textRow("billingFirstName", "First Name", [], true) %>
+ <%= textRow("billingLastName", "Last Name", [], true) %>
+</table>
+
+<h4>Payment information:</h4>
+
+<% if (request.scheme == 'https') { %>
+ <div class='secure'>
+ <p>Your payment information will be sent securely.</p>
+ </div>
+<% } %>
+
+<%
+ function purchaseType(id, title) {
+ var sel;
+ if (! cart.billingPurchaseType) {
+ sel = (id == 'creditcard');
+ } else {
+ sel = (cart.billingPurchaseType == id);
+ }
+ %>
+ <span class="paymentbutton">
+ <input type="radio" value="<%= id %>" name="billingPurchaseType" id="purchase<%= id %>" <%= sel ? 'checked="checked"' : "" %> style="display: inline-block; vertical-align: middle;"/>
+ <label for="purchase<%= id %>">
+ <img src="/static/img/billing/<%= id %>.gif" style="display: inline-block; vertical-align: middle;" /> <span style="display: inline-block; vertical-align: middle;"><%= title %></span>
+ </label>
+ </span>
+ <%
+ }
+%>
+
+<div id="billingselect">
+<p class="<%= errorIfInvalid("billingPurchaseType") %>">Pay using:
+<% purchaseType('creditcard', 'Credit Card'); %>
+<% purchaseType('invoice', 'Invoice'); %>
+<% purchaseType('paypal', 'PayPal'); %>
+</p>
+</div>
+
+<table class="billingtable">
+ <%= textRow("billingCCNumber", "Credit Card Number", ['creditcardreq']) %>
+
+<% function cardInput(cctype) {
+ var classes = [];
+ if (cart.billingCCNumber) {
+ if (cctype == billing.getCcType(cart.billingCCNumber)) {
+ classes.push("ccimageselected");
+ }
+ }
+ classes.push("ccimage");
+ var img = IMG({
+ src: "/static/img/billing/"+cctype+".gif",
+ alt: cctype,
+ className: classes.join(" "),
+ style: "vertical-align: middle",
+ id: "img"+cctype});
+ return img;
+ } %>
+
+ <tr class="billingfield creditcardreq">
+ <td class="pcell">&nbsp;</td>
+ <td valign="center">
+ <div id="ccimages">
+ <% ["visa", "mc", "disc", "amex"].forEach(function(t) { %>
+ <%= cardInput(t) %>
+ <% }); %>
+ </div>
+ </td>
+ </tr>
+
+ <tr class="billingfield creditcardreq <%= errorIfInvalid("billingMeta") %>">
+ <td class="pcell">Expiration (MM/YY):</td>
+ <td>
+ <input type="text" name="billingExpirationMonth" size="2" maxlength="2"
+ value="<%= (cart.billingExpirationMonth || '') %>" />
+ /
+ <input type="text" name="billingExpirationYear" size="2" maxlength="2"
+ value="<%= (cart.billingExpirationYear || '') %>" />
+ &nbsp;&nbsp;&nbsp;&nbsp;CSC/CVC:
+ <input type="text" name="billingCSC" size="4" maxlength="4"
+ value="<%= (cart.billingCSC || '') %>"/>
+ <a target="_blank" href="//<%= getFullSuperdomainHost() %>/ep/store/csc-help" id="cschelp">what's this?</a>
+ </td>
+ </tr>
+
+ <tr class="billingfield creditcardreq">
+ <td colspan=2 style="text-align: center; font-weight: normal;">(Be sure to enter your <strong>credit card billing address</strong> below.)</td>
+ </tr>
+
+ <tr class="<%= classesPlusError(['billingfield', 'creditcardreq', 'invoicereq'], 'billingCountry') %>">
+ <td class="pcell">Country:</td>
+ <td>
+ <select id="billingCountry" name="billingCountry">
+ <% countryList.forEach(function(c) { %>
+ <%= ((c[0] == cart.billingCountry) ?
+ OPTION({value: c[0], selected: true}, c[1]) :
+ OPTION({value: c[0]}, c[1])) %>
+ <% }); %>
+ </select>
+ </td>
+ </tr>
+
+ <%= textRow("billingAddressLine1", "Address", ['creditcardreq', 'invoicereq']) %>
+ <%= textRow("billingAddressLine2", "", ['creditcardreq', 'invoicereq']) %>
+ <%= textRow("billingCity", "City", ['creditcardreq', 'invoicereq']) %>
+
+ <tr class="<%= classesPlusError(['billingfield', 'creditcardreq', 'invoicereq', 'usonly'], 'billingState') %>">
+ <td class="pcell">State:</td>
+ <td>
+ <select id="billingState" name="billingState">
+ <% usaStateList.forEach(function(s) { %>
+ <%= ((s == cart.billingState) ?
+ OPTION({value: s, selected: true}, s) :
+ OPTION({value: s}, s)) %>
+ <% }); %>
+ </select>
+ </td>
+ </tr>
+ <%= textRow("billingProvince", "Province", ['creditcardreq', 'invoicereq', 'intonly'])%>
+ <%= textRow("billingZipCode", "Zip Code", ['creditcardreq', 'invoicereq', 'usonly']) %>
+ <%= textRow("billingPostalCode", "Postal Code", ['creditcardreq', 'invoicereq', 'intonly'])%>
+ <tr class="billingfield paypalreq"><td colspan=2 class="firstcell">Click "<%= billingButtonName %>" below to continue with PayPal.</td></tr>
+</table>
+
+<% if (showCouponCode) { %>
+ <h4>Optional information:</h4>
+ <table class="billingtable">
+ <%= textRow("billingReferralCode", "Referral Code", [], true) %>
+ </table>
+<% } %>
+
+
+<%= billingFinalPhrase %> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs
new file mode 100644
index 0000000..147ff1b
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/cart.ejs
@@ -0,0 +1,119 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %>
+<div id="<%= shoppingcartid %>" class="shoppingcart">
+ <table cellspacing="0" cellpadding="0">
+ <tr>
+ <th>Item</th>
+ <th class="pcell">Cost</th>
+ </tr>
+
+ <% if (! ('baseCost' in cart) && ! ('supportCost' in cart)) { %>
+ <tr>
+ <td colspan="2" class="noitems">
+ <em>Nothing selected.</em>
+ </td>
+ </tr>
+ <% } %>
+
+ <% if (cart.baseCost) { %>
+ <tr class="base">
+ <td>
+ <span class="item">Etherpad Private Network</span><br />
+ <span class="desc"><%= cart.numUsers %> users
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("purchase") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ </td>
+ <td class="pcell">US$<%= dollars(cart.baseCost) %></td>
+ </tr>
+ <% if (cart.couponProductPctDiscount) { %>
+ <tr class="basediscount refer">
+ <td>
+ <span class="desc">Referral - <%= cart.couponProductPctDiscount %>% savings</span>
+ </td>
+ <td class="pcell">-US$<%= dollars(cart.productReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <% } %>
+
+ <% if (cart.supportCost) { %>
+ <tr class="support">
+ <td>
+ <span class="item">Support Contract
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("support-contract") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ <br />
+ <span class="desc">1 year</span>
+ </td>
+ <td class="pcell">US$<%= dollars(cart.supportCost) %></td>
+ </tr>
+ <% if (cart.couponSupportPctDiscount) { %>
+ <tr class="supportdiscount refer">
+ <td>
+ <span class="desc">Referral - <%= cart.couponSupportPctDiscount %>% savings</span>
+ </td>
+ <td class="pcell">-US$<%= dollars(cart.supportReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <% } else if (cart.baseCost) { %>
+ <tr class="support">
+ <td>
+ <span class="item">No Support Contract
+ <% if (editable) { %>
+ <span class="editlink">(<a href="<%= pathTo("support-contract") %>">edit</a>)</span>
+ <% } %>
+ </span>
+ </td>
+ <td class="pcell">US$0.00</td>
+ </tr>
+ <% } %>
+
+ <% if (cart.freeUserCount) { %>
+ <tr class="referralbonus refer">
+ <td>
+ <span class="item">Bonus Users</span><br />
+ <span class="desc">
+ Referral - <%= cart.freeUserCount %> free
+ user<%= (cart.freeUserCount == 1 ? '' : "s") %>
+ </span>
+ </td>
+ <td class="pcell">US$0.00</td>
+ </tr>
+ <% } %>
+
+ <tr class="spacer"><td>&nbsp;</td></tr>
+
+ <%
+ var pctDiscount = cart.couponTotalPctDiscount;
+ var hasSubtotal = pctDiscount > 0;
+ %>
+ <% if (hasSubtotal) { %>
+ <tr class="subtotal">
+ <td>Subtotal</td>
+ <td class="pcell">US$<%= dollars(cart.subTotal) %></td>
+ </tr>
+ <tr class="referraldiscount refer">
+ <td>Referral - <%= pctDiscount %>% savings</td>
+ <td class="pcell">-US$<%= dollars(cart.totalReferralDiscount) %></td>
+ </tr>
+ <% } %>
+ <tr class="total<%= (hasSubtotal ? '' : ' withoutsubtotal') %>">
+ <td>Total</td>
+ <td class="pcell">US$<%= dollars(cart.total) %></td>
+ </tr>
+ </table>
+</div> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs
new file mode 100644
index 0000000..817f0eb
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/checkout-template.ejs
@@ -0,0 +1,38 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><% helpers.includeCss("store/eepnet-checkout.css"); %>
+<% helpers.includeJQuery() %>
+<% helpers.includeJs("etherpad.js") %>
+<% helpers.setHtmlTitle(title); %>
+
+<%
+var selectCount = 0;
+function select(id, title) {
+ var className = 'poslabel';
+ if (pageId == id) {
+ className += ' current';
+ }
+ selectCount++;
+ return SPAN({className: className}, selectCount+". "+title);
+}
+%>
+
+<div class="fpcontent">
+<div id="<%= pageId %>">
+
+ <h2>Private Network Edition: Purchase Online</h2>
+
+ <%= helpers.rafterNote() %>
+
+</div><!-- /pageId -->
+</div><!-- /fpcontent -->
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs
new file mode 100644
index 0000000..3b38775
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/confirmation.ejs
@@ -0,0 +1,33 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><%
+helpers.includeJs('confirmation.js');
+%>
+
+<% if (request.params.frompaypal) {
+ handlePayPalRedirect();
+} %>
+
+<%= displaySummary(true) %>
+
+<% switch(cart.billingPurchaseType) {
+ case 'creditcard': case 'paypal': %>
+ <p>If this looks good, click "Purchase" below to complete your purchase.</p>
+ <% break;
+ case 'invoice': %>
+ <p>If this looks good, print this page and mail it along with a check or other
+ prearranged payment to:</p><p><strong>AppJet, Inc.<br>Pier 38 - Suite 210<br>The Embarcadero<br>San Francisco, CA 94107</strong></p>
+ <% break;
+}
+ %>
+
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs
new file mode 100644
index 0000000..4d710f2
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/license-info.ejs
@@ -0,0 +1,40 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><p>Your license key will be issued to a particular individual at your organization, and will be delivered to the email address you specify below.</p>
+
+<table border="1">
+ <tr class="<%= errorIfInvalid('email') %>">
+ <td>Email address to receive license key:</td>
+ <td><input name="email" type="text"
+ value="<%= cart.email %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('ownerName') %>">
+ <td>Name of license owner (your name):</td>
+ <td><input name="ownerName" type="text"
+ value="<%= cart.ownerName %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('orgName') %>">
+ <td>Organization or company name:</td>
+ <td><input name="orgName" type="text"
+ value="<%= cart.orgName %>" /></td>
+ </tr>
+
+ <tr class="<%= errorIfInvalid('licenseAgreement') %> center">
+ <td colspan=2>
+ <input id="c1" type="checkbox" name="licenseAgreement" <%= (cart.licenseAgreement ? 'checked="checked"' : '') %> />
+ <label for="c1">I agree to the <a target="_blank" href="/static/html/eepnet/eepnet-license.html">License</a>.</label>
+ </td>
+ </tr>
+</table> \ No newline at end of file
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs
new file mode 100644
index 0000000..49cb3bb
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/purchase.ejs
@@ -0,0 +1,33 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><p>Thank you for choosing to purchase <strong>Enterprise EtherPad Private Network Edition.</strong></p>
+
+<p>A license allows a certain number of concurrent users, at a one-time cost of US $<%= dollars(costPerUser) %> per user with no recurring costs. <a target="_blank" href="/ep/about/pricing-eepnet-users">Learn more about how we count users</a>.</p>
+
+<p>How many users should your license support?</p>
+
+<table>
+ <tr class="<%= errorIfInvalid('numUsers') %>">
+ <td class="pcell">Number of Users at US $<%= dollars(costPerUser) %>/user:</td>
+ <td class="tcell"><input name="numUsers" type="text"
+ value="<%= cart.numUsers %>" /></td>
+ </tr>
+</table>
+
+<table>
+ <tr class="<%= errorIfInvalid('couponCode') %>">
+ <td colspan="2" class="pcell">Referral Code (optional):</td>
+ <td class="tcell"><input id="couponCode" name="couponCode" type="text"
+ maxlength="8" value="<%= cart.couponCode %>" /></td>
+ </tr>
+</table>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs
new file mode 100644
index 0000000..8d3a2a5
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/receipt.ejs
@@ -0,0 +1,43 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><% if (cart.showStartOverMessage) { %>
+ <div class="innererrormsg">
+ Your purchase is complete! To purchase another item, please return to the <a href="<%= pathTo('purchase') %>?clearcart=1">purchase page</a>.
+ </div>
+<% }
+
+switch(cart.status) {
+ case 'success':
+ %><p><strong>Thank you for your purchase!</strong> This page serves as your receipt. Please print it for your records. You will receive a copy of this receipt and license key by email shortly.</p><%
+ break;
+ case 'pending':
+ %><p>Your purchase is pending approval by PayPal. Once it clears,
+ usually in 2-5 business days, you will receive a copy of this receipt and
+ your license key by email.</p><%
+ break;
+} %>
+
+<%
+ var instructions = "/ep/pne-manual";
+ var download = "/ep/store/eepnet-download-nextsteps";
+%>
+
+<p>To install EtherPad Private Network Edition:</p>
+<ul>
+ <li><a href="<%= download %>">Download Etherpad: Private Network Edition</a>.</li>
+ <li>Read the <a href="<%= instructions %>">EtherPad: Private Network Edition installation instructions</a>.</li>
+</ul>
+
+<p><strong></strong></p>
+
+<%= displaySummary() %>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs
new file mode 100644
index 0000000..753873c
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/summary.ejs
@@ -0,0 +1,91 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><%
+function textRow(tcell, pcell) {
+ %><tr>
+ <td class="tcell"><%= tcell %></td>
+ <td class="pcell"><%= pcell %></td>
+ </tr>
+ <%
+}
+var keyData = {
+ ownerName: cart.ownerName,
+ orgName: cart.orgName
+}
+if (cart.licenseKey) {
+ var parts = cart.licenseKey.split(":");
+ keyData.ownerName = parts[0];
+ keyData.orgName = parts[1];
+ keyData.key = parts[2];
+
+ keyData.keyLine1 = keyData.key.substring(0, keyData.key.length/3);
+ keyData.keyLine2 = keyData.key.substring(keyData.key.length/3, 2*keyData.key.length/3);
+ keyData.keyLine3 = keyData.key.substring(2*keyData.key.length/3, keyData.key.length);
+}
+
+function makeRows(arr) {
+ arr.forEach(function(arr) { textRow(arr[0], arr[1]); });
+}
+%>
+
+<h4>License Information <% if (editable) { %><span class="editlink">(<a href="<%= pathTo("license-info") %>">edit</a>)</span><% } %></h4>
+
+<table>
+ <%
+ makeRows([
+ [ "Administrator name:", keyData.ownerName ],
+ [ "Organization/Company:", keyData.orgName ],
+ [ "Email address for delivery:", cart.email ],
+ [ "Total users:", cart.userCount ]
+ ]);
+ if (keyData.key) {
+ textRow("License key:", keyData.keyLine1+"<BR>"+keyData.keyLine2+"<BR>"+keyData.keyLine3);
+ %><!-- key: <%= keyData.key %> --><%
+ }
+ %>
+</table>
+
+<h4>Payment Information <% if (editable) { %><span class="editlink">(<a href="<%= pathTo("billing-info") %>">edit</a>)</span><% } %></h4>
+
+<table>
+ <%
+ var isUs = cart.billingCountry == "US";
+ switch(cart.billingPurchaseType) {
+ case 'creditcard':
+ makeRows([
+ [ "Credit card number:", obfuscateCC(cart.billingCCNumber) ],
+ [ "Expiration date:", cart.billingExpirationMonth+" / 20"+cart.billingExpirationYear ]
+ ]);
+ // falling through intentional.
+ case 'invoice':
+ makeRows([
+ [ "Purchaser name:", cart.billingFirstName + " " + cart.billingLastName ],
+ [ "Purchaser address: ", cart.billingAddressLine1 + "<br>" +
+ (cart.billingAddressLine2 ? cart.billingAddressLine2 + "<br>" : "") +
+ cart.billingCity + ", " +
+ (isUs?cart.billingState:cart.billingProvince) + "<br>" +
+ (isUs?cart.billingZipCode:cart.billingPostalCode) +
+ (isUs?'':', '+cart.billingCountry) ],
+ [ "Invoice number: ", cart.invoiceId ]
+ ]);
+ break;
+ case 'paypal':
+ textRow("Paid using:", "PayPal");
+ textRow("InvoiceNumber:", cart.invoiceId);
+ }
+ %>
+</table>
+
+<h4>Summary of Charges</h4>
+
+<%= displayCart("shoppingconfirmation", editable) %>
diff --git a/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs b/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs
new file mode 100644
index 0000000..ff33fda
--- /dev/null
+++ b/trunk/etherpad/src/templates/store/eepnet-checkout/support-contract.ejs
@@ -0,0 +1,41 @@
+<% /* Copyright 2009 Google Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS-IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. */ %><p>A support contract gives you free upgrades and help directly from the engineers who developed EtherPad. Support contracts cost US $<%= dollars(costPerUser * supportCostPct/100) %> per user per year, with a US $<%= dollars(supportMinCost) %> per year minimum. <a target="_blank" href="/ep/about/pricing-eepnet-support">Learn more about support contracts</a>.</p>
+
+<p>For the <%= cart.numUsers %>-user license you've selected, a support contract costs US $<%= discountedSupportCost() !== undefined ? dollars(discountedSupportCost()) : dollars(supportCost()) %>.
+
+<p>Do you want a support contract?</p>
+
+<table>
+ <tr>
+ <td>
+ <input id="r1" type="radio" name="supportContract" value="true"
+ <%= (cart.supportContract == "true") ? "checked" : "" %> />
+ </td>
+ <td>
+ <label for="r1">Yes, I want to purchase a support contract.</label>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+ <input id="r2" type="radio" name="supportContract" value="false"
+ <%= (cart.supportContract != "true")? "checked" : "" %> />
+ </td>
+ <td>
+ <label for="r2">
+ No thanks, I just want the software license.
+ </label>
+ </td>
+ </tr>
+</table> \ No newline at end of file