[bknr-cvs] r2404 - in branches/bos/projects/bos: . payment-website/templates/de web

hhubner at common-lisp.net hhubner at common-lisp.net
Thu Jan 24 20:19:51 UTC 2008


Author: hhubner
Date: Thu Jan 24 15:19:50 2008
New Revision: 2404

Modified:
   branches/bos/projects/bos/payment-website/templates/de/versand_info.xml
   branches/bos/projects/bos/payment-website/templates/de/versand_quittung.xml
   branches/bos/projects/bos/screenrc
   branches/bos/projects/bos/web/tags.lisp
Log:
Make print certificate optional.  Sponsors can opt not to receive a
printed version.


Modified: branches/bos/projects/bos/payment-website/templates/de/versand_info.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/versand_info.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/versand_info.xml	Thu Jan 24 15:19:50 2008
@@ -16,7 +16,7 @@
              <!--<meta http-equiv="content-type" content="text/html; charset=UTF-8" />-->
 		<title>REGENWALD für SAMBOJA LESTARI</title>
 	</head>
-	<body>
+	<body onload="if (document.formular['want-print'][1].checked) document.getElementById('postal_info').style.visibility = 'inherit'">
 	
 		<!-- header and menu_top -->
 		<div id="header">
@@ -89,13 +89,13 @@
 									</td>							
 								</tr>
 								<tr>
-									<td colspan="3" height="8"> </td>
+									<td colspan="3" height="3"> </td>
 								</tr>
 								<tr>
 									<td colspan="3" height="1" bgcolor="#c0c0c0"> </td>
 								</tr>
 								<tr>
-									<td colspan="3" height="8"> </td>
+									<td colspan="3" height="3"> </td>
 								</tr>		
 								<tr>
 									<td colspan="3">
@@ -113,18 +113,42 @@
 									</td>
 								</tr>
 								<tr>
-									<td colspan="3" height="6"> </td>
+									<td colspan="3" height="3"> </td>
+								</tr>
+								<tr>
+									<td colspan="3" height="1" bgcolor="#c0c0c0"> </td>
+								</tr>
+								<tr>
+									<td colspan="3" height="5"> </td>
+								</tr>		
+								<tr>
+									<td colspan="3">
+										Wir senden Ihnen gerne eine attraktive Urkunde per Post zu.  In jedem Fall ist
+										Ihre Urkunde für Sie als PDF abrufbar.
+									</td>
 								</tr>	
 								<tr>
+									<td colspan="3" height="3"> </td>
+								</tr>		
+								<tr>
 									<td colspan="3">
-										Bitte überprüfen bzw. korrigieren Sie die angegebene Adresse für den Versand
-										Ihrer Regenwald-Urkunde:
+										<input type="radio"
+																	name="want-print"
+																	value="no"
+																	onclick="document.getElementById('postal_info').style.visibility = 'hidden'"
+																	checked="checked"/>
+										Nur Download-Urkunde<br/>
+										<input type="radio"
+																	name="want-print"
+																	value="yes"
+																	onclick="document.getElementById('postal_info').style.visibility = 'inherit'"/>
+										Urkunde per Post
 									</td>
 								</tr>
 								<tr>
 									<td colspan="3" height="10"> </td>
 								</tr>
-								<tr>
+								<tr id="postal_info" style="visibility: hidden">
 									<td>Versandadresse<br />für die Urkunde:<br /><br /><br /></td>
 									<td></td>
 									<td>
@@ -168,7 +192,7 @@
 					</a>
 					<br /><br /><br /><br /><br /><br /><br /><br /><br />
 					[<strong>Regenwald-Urkunde</strong>]<br />
-					Sie oder der Beschenkte erhalten auf dem Postweg eine attraktive
+					Wenn Sie es wünschen, erhalten Sie auf dem Postweg eine attraktive
 					<img src="/images/pfeil_link_on.gif" width="10" height="9" alt="" />
 					<a href="javascript:window_extra('certificat')" class="more">
 						Urkunde

Modified: branches/bos/projects/bos/payment-website/templates/de/versand_quittung.xml
==============================================================================
--- branches/bos/projects/bos/payment-website/templates/de/versand_quittung.xml	(original)
+++ branches/bos/projects/bos/payment-website/templates/de/versand_quittung.xml	Thu Jan 24 15:19:50 2008
@@ -43,6 +43,7 @@
 					<input type="hidden" name="__sponsorid" value="$(sponsor-id)" />
 					<input type="hidden" name="__password" value="$(master-code)" />
 					<input type="hidden" name="contract-id" value="$(contract-id)" />
+					<input type="hidden" name="want-print" value="$(want-print)" />
 					<input type="hidden" name="name" value="$(name)" />
 					<input type="hidden" name="address" value="$(address)" />
 					<input type="hidden" name="email" value="$(email)" />
@@ -50,17 +51,17 @@
 					<table id="formTable" width="95%" border="0" cellspacing="0" cellpadding="0">
 						<tr>
 							<td colspan="3">
-								Wir werden Ihre Regenwald-Urkunde auf den folgenden Namen ausstellen und diese an
-								die unten angegebene Adresse versenden:
-								<br /><br /><br />
-								Name für Regenwald-Urkunde: $(name)
-								<br /><br />
-								Versandadresse für Urkunde: <br />
+								Wir werden Ihre Regenwald-Urkunde auf den folgenden Namen ausstellen:<br /><br />
+								$(name)
+        <bos:only-if-print>
+								 <br /><br />
+ 								Versandadresse für die Urkunde: <br />
 <pre>
 $(address)
 $(postcode)
 $(country)
 </pre>
+        </bos:only-if-print>
 							</td>
 						</tr>
 						<tr>

Modified: branches/bos/projects/bos/screenrc
==============================================================================
--- branches/bos/projects/bos/screenrc	(original)
+++ branches/bos/projects/bos/screenrc	Thu Jan 24 15:19:50 2008
@@ -1,5 +1,6 @@
 multiuser on
 acladd hans
+acladd kilian
 
 zombie qr
 defscrollback 5000
@@ -9,7 +10,7 @@
 msgminwait 0
 msgwait 0
 
-chdir /home/hans/bknr-svn/projects/bos
+chdir /home/bknr/bknr-svn/projects/bos
 
 screen -t webserver lisp -core bos.core -slime
 #logfile screen.log

Modified: branches/bos/projects/bos/web/tags.lisp
==============================================================================
--- branches/bos/projects/bos/web/tags.lisp	(original)
+++ branches/bos/projects/bos/web/tags.lisp	Thu Jan 24 15:19:50 2008
@@ -37,8 +37,10 @@
   (mapc #'emit-template-node children))
 
 (define-bknr-tag generate-cert ()
-  (with-template-vars (gift email name address)
+  (with-template-vars (gift email name address want-print)
     (let ((contract (find-store-object (parse-integer (get-template-var :contract-id)))))
+      (when (equal want-print "no")
+	(contract-set-download-only-p contract t))
       (contract-issue-cert contract name :address address :language (session-variable :language))
       (mail-worldpay-sponsor-data (get-template-var :request))
       (bknr.web::redirect-request :target (if gift "index"
@@ -51,6 +53,11 @@
     (when (>= (contract-price contract) (parse-integer min-amount))
       (html (checkbox-field "mail-certificate" message :checked nil)))))
 
+(define-bknr-tag only-if-print (&key children)
+  (with-template-vars (want-print)
+    (when (equal want-print "yes")
+      (mapc #'emit-template-node children))))
+
 (define-bknr-tag maybe-base (&key href)
   (when (and href
 	     (not (equal "" href)))



More information about the Bknr-cvs mailing list