[guadec-web-regcfp] Receipt



commit be0384be8a95f1f0bbd98385e4b8d53484cec589
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Mon Jun 22 23:29:13 2015 +0200

    Receipt

 routes/registration.js          |    9 +++++++
 views/registration/receipt.hbs  |   46 +++++++++++++++++++++++++++++++++++++++
 views/registration/register.hbs |    3 +-
 3 files changed, 57 insertions(+), 1 deletions(-)
---
diff --git a/routes/registration.js b/routes/registration.js
index 1df61a0..c1e3dc8 100644
--- a/routes/registration.js
+++ b/routes/registration.js
@@ -201,6 +201,15 @@ router.post('/pay/do', function(req, res, next) {
   }
 });
 
+router.all('/receipt', utils.require_user);
+router.all('/receipt', utils.require_permission('registration/request_receipt'));
+router.get('/receipt', function(req, res, next) {
+  req.user.getRegistration()
+  .complete(function(err, reg) {
+    res.render('registration/receipt', { registration: reg });
+  });
+});
+
 router.all('/register', utils.require_permission('registration/register'));
 router.get('/register', function(req, res, next) {
   if(req.user){
diff --git a/views/registration/receipt.hbs b/views/registration/receipt.hbs
new file mode 100644
index 0000000..21b9b53
--- /dev/null
+++ b/views/registration/receipt.hbs
@@ -0,0 +1,46 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"><head>
+<title>Receipt for GUADEC 2015</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta name="author" content="Andreas Nilsson"/>
+<meta name="description" content="content" />
+<meta name="robots" content="index, follow" />
+<link rel="stylesheet" href="/css/style.css" type="TEXT/CSS" media="screen"/>
+ 
+<style>
+ 
+body {
+  margin: 0;
+  padding: 0;
+  font-family: sans-serif;
+}
+ 
+.header {
+  width: 100%;
+  height: 100px;
+  background: #6B8E9F url('https://www.guadec.org/wp-content/uploads/2014/10/guadec-logo-white.png') center 
center no-repeat;
+}
+ 
+.content {
+  margin: 30px;
+}
+ 
+</style>
+ 
+ 
+</head>
+<body>
+ 
+ 
+<div class="header">&nbsp;</div>
+<div class="content">
+<h1>Receipt</h1>
+<h3>Thank you, {{registration.User.name}} for registering to GUADEC 2015!</h3>
+ 
+<p>We received your payment of {{config.registration.currency_symbol}}{{registration.paid}} to the GNOME 
Foundation, as a registration fee for GUADEC 2015.</p>
+ 
+<p>See you in Sweden!</p>
+</div>
+ 
+</body>
+</html>
diff --git a/views/registration/register.hbs b/views/registration/register.hbs
index 9d89284..e5b4b3d 100644
--- a/views/registration/register.hbs
+++ b/views/registration/register.hbs
@@ -14,7 +14,8 @@
 Registered
 {{else}}
 {{config.registration.currency_symbol}} <input type="text" name="regfee" class="reg-fee" 
value="{{config.registration.default_amount}}">
-<p class="note">We can only provide receipts for payments over 
{{config.registration.currency_symbol}}{{config.registration.min_amount_for_receipt}}.
+<p class="note">Feel free to support us by donating as much as you're able to.<br />
+Please note that we can only provide receipts for payments over 
{{config.registration.currency_symbol}}{{config.registration.min_amount_for_receipt}}.
 {{/unless}}</p>
 </tr>
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]