Add commit button functionality
parent
66120a60b8
commit
e62375516b
|
@ -52,28 +52,38 @@ block content
|
||||||
h3 Step 3: Set up your monthly donation
|
h3 Step 3: Set up your monthly donation
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
||||||
a.btn.btn-block.btn-lg.btn-primary(href=donateUrl target='_blank') Open the #{displayName} donation page
|
a#commit-btn-donate.btn.btn-block.btn-lg.btn-primary(href=donateUrl target='_blank') Open the #{displayName} donation page
|
||||||
|
|
||||||
.spacer
|
.spacer
|
||||||
.col-xs-12.col-sm-6.col-sm-offset-3
|
.col-xs-12.col-sm-6.col-sm-offset-3
|
||||||
h3 Step 4: Confirm your commitment to your goal
|
h3#commit-step4-text.disabled
|
||||||
|
Step 4: Confirm
|
||||||
|
span#commit-step4-hidden.disabled (Do step 3 first)
|
||||||
|
span#commit-step4-show.hidden your commitment to your goal
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
||||||
a#commit-btn-submit.btn.btn-block.btn-lg.signup-btn(href=donateUrl target='_blank') Commit
|
button#commit-btn-submit.btn.btn-block.btn-lg.btn-primary.disabled Commit
|
||||||
|
|
||||||
if pledge
|
if pledge
|
||||||
form.row(name='stop-pledge' action='/commit/stop-commitment' method='post')
|
form.row(name='stop-pledge' action='/commit/stop-commitment' method='post')
|
||||||
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
||||||
.button-spacer
|
.button-spacer
|
||||||
button.btn.btn-block.btn-danger(name='submit' type='submit') Stop my current pledge
|
button.btn.btn-block.btn-lg.btn-default(name='submit' type='submit') Stop my current pledge
|
||||||
else
|
else
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
|
||||||
.button-spacer
|
.button-spacer
|
||||||
a.btn.btn-block.btn-default(href='/map') Maybe later
|
a.btn.btn-block.btn-lg.btn-default(href='/map') Maybe later
|
||||||
.spacer
|
.spacer
|
||||||
script.
|
script.
|
||||||
$(function() {
|
$(function() {
|
||||||
|
$('#commit-btn-donate').click(function() {
|
||||||
|
$('#commit-btn-submit').removeClass('disabled');
|
||||||
|
$('#commit-step4-text').removeClass('disabled');
|
||||||
|
$('#commit-step4-hidden').hide();
|
||||||
|
$('#commit-step4-show').removeClass('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
$('#commit-btn-submit').click(function() {
|
$('#commit-btn-submit').click(function() {
|
||||||
window.location.href = '/commit/pledge?' + $('form').serialize();
|
window.location.href = '/commit/pledge?' + $('form').serialize();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue