[guadec-web-regcfp] fix



commit 8bc0279949dd76e2086d4de54498da8b8a89ecf8
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date:   Tue Jun 2 13:44:08 2015 +0200

    fix
    
    Signed-off-by: Patrick Uiterwijk <puiterwijk redhat com>

 routes/registration.js          |    8 ++++----
 views/registration/register.hbs |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/routes/registration.js b/routes/registration.js
index d637a97..e5d78b6 100644
--- a/routes/registration.js
+++ b/routes/registration.js
@@ -86,7 +86,8 @@ router.all('/register', utils.require_permission('registration/register'));
 router.get('/register', function(req, res, next) {
   req.user.getRegistration()
   .complete(function(err, reg) {
-    res.render('registration/register', { registration: reg, genders: all_genders });
+    res.render('registration/register', { registration: reg, genders: all_genders,
+                                          ask_regfee: registration == null});
   });
 });
 
@@ -101,8 +102,7 @@ router.post('/register', function(req, res, next) {
       country: req.body.country.trim(),
       badge_printed: false,
       receipt_sent: false,
-      UserId: req.user.Id,
-      is_not_saved: true
+      UserId: req.user.Id
     };
 
     console.log("Reg info: " + JSON.stringify(reg_info));
@@ -115,7 +115,7 @@ router.post('/register', function(req, res, next) {
 
     if((all_genders.indexOf(reg_info.gender) == -1) || (reg == null && regfee == null)) {
       res.render('registration/register', { registration: reg_info, genders: all_genders,
-                                            submission_error: true});
+                                            submission_error: true, ask_regfee: reg == null});
     } else {
       // Form OK
       if(reg == null) {
diff --git a/views/registration/register.hbs b/views/registration/register.hbs
index c5cb5e9..bc5334c 100644
--- a/views/registration/register.hbs
+++ b/views/registration/register.hbs
@@ -14,7 +14,7 @@ checked
</td></tr>
 
 <tr><td>Registration fee:</td><td>
-{{#unless registration.is_not_saved}}
+{{#unless ask_regfee}}
 Registered
 {{else}}
 {{#each config.registration.fee_options}}


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