[guadec-web-regcfp] Fixes
- From: Patrick Uiterwijk <puiterwijk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [guadec-web-regcfp] Fixes
- Date: Fri, 19 Jun 2015 12:04:22 +0000 (UTC)
commit 51b6bf0b2b1d3ca0d3b7d9ac9f05ac2967cc091b
Author: Patrick Uiterwijk <puiterwijk redhat com>
Date: Wed Jun 10 21:31:11 2015 +0200
Fixes
config/config.json.example | 2 +-
routes/registration.js | 6 +-----
views/partials/registration/payment.hbs | 9 +--------
views/registration/pay.hbs | 11 ++---------
views/registration/register.hbs | 2 +-
5 files changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/config/config.json.example b/config/config.json.example
index dee1ccf..6782229 100644
--- a/config/config.json.example
+++ b/config/config.json.example
@@ -40,7 +40,7 @@
"enabled": false,
"currency_symbol": "€",
"min_amount_for_receipt": 20,
- "fee_options": [5, 10, 15, 20]
+ "default_amount": 40
}
}
}
diff --git a/routes/registration.js b/routes/registration.js
index 2f043e5..e7bee0e 100644
--- a/routes/registration.js
+++ b/routes/registration.js
@@ -30,11 +30,7 @@ router.get('/pay', function(req, res, next) {
});
router.post('/pay', function(req, res, next) {
- var regfee = req.body.regfee;
- if(regfee == 'custom')
- {
- regfee = req.body.regfee_custom.trim();
- }
+ var regfee = req.body.regfee.trim();
if(regfee == null) {
res.render('registration/pay');
diff --git a/views/partials/registration/payment.hbs b/views/partials/registration/payment.hbs
index 1393ef1..a2888d4 100644
--- a/views/partials/registration/payment.hbs
+++ b/views/partials/registration/payment.hbs
@@ -1,13 +1,6 @@
To complete your registration, choose a payment for {{config.registration.currency_symbol}}{{regfee}}
below:<br/><br/>
-<form class="submission-form">
+<form class="submission-form" action="/registration/pay/do" method="POST">
<input type="radio" name="method" value="paypal" checked="checked"> Pay using PayPal<br/>
<input type="radio" name="method" value="on-site" style="vertical-align: top;"> <div style="display:
inline-block;">Pay at the conference<p class="note">If you select this option, you can pay at the
registration desk at GUADEC</p></div><br/><br/>
<input class="submit-talk" type="submit" value="Complete registration" style="float: right;">
</form>
-
-<!--
-<form action="/registration/pay/do" method="POST">
-<input type="hidden" name="method" value="onsite">
-<input type="hidden" name="regfee" value="{{regfee}}">
-<input type="submit" value="Pay at the conference">
-</form><br />-->
diff --git a/views/registration/pay.hbs b/views/registration/pay.hbs
index 8105a2a..594eda7 100644
--- a/views/registration/pay.hbs
+++ b/views/registration/pay.hbs
@@ -2,15 +2,8 @@
<table class="submission-form">
<tr><td>Your name:</td><td><input type="text" name="submitter_name" value="{{user.name}}" disabled
/></td></tr>
<tr><td>Amount:</td><td>
-{{#each config.registration.fee_options}}
-<input type="radio" name="regfee" value="{{this}}" id="regfee_{{this}}">
-<label for="regfee_{{this}}">{{../config.registration.currency_symbol}}{{this}}</label>
-<br />
-{{/each}}
-<input type="radio" name="regfee" value="custom">
-<input type="text" name="regfee_custom">
-</td>
-<td>NOTE: Only registrations with a fee of at least
{{config.registration.currency_symbol}}{{config.registration.min_amount_for_receipt}} can get a receipt! (you
can always pay more)
+{{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}}.
</td></tr>
<tr><td> </td>
diff --git a/views/registration/register.hbs b/views/registration/register.hbs
index 9c67670..f2e2816 100644
--- a/views/registration/register.hbs
+++ b/views/registration/register.hbs
@@ -13,7 +13,7 @@
{{#unless ask_regfee}}
Registered
{{else}}
-{{config.registration.currency_symbol}} <input type="text" name="regfee" class="reg-fee" value="40">
+{{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}}.
{{/unless}}</p>
</tr>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]