Add stop commit functionality

This commit is contained in:
Berkeley Martinez
2015-10-06 18:22:12 -07:00
parent d132978df9
commit 0b716c0057
2 changed files with 49 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ block content
h3.text-center Commit to yourself. Commit to a nonprofit.
.row
.col-xs-12.col-sm-6.col-sm-offset-3
p Give yourself ongoing motivation and help nonprofits right away. Pledge a monthly donation to a nonprofit until youve earned either your Front End or Full Stack Development Certification.
p Give yourself external motivation and help nonprofits right away. Pledge a monthly donation to a nonprofit until youve earned either your Front End or Full Stack Development Certification.
.row
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
h4 Pledge to #{displayName}
@@ -47,8 +47,17 @@ block content
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
a#commit-btn-submit.btn.btn-block.btn-lg.signup-btn(href='https://www.girldevelopit.com/donate' target='_blank') Commit (and open donate page)
.button-spacer
.spacer
if pledge
form.row(name='stop-pledge' action='/commit/stop-commitment' method='post')
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
button.btn.btn-sm.btn-danger(name='submit' type='submit') Stop my pledge
.spacer
else
.row
.col-xs-12.col-sm-6.col-sm-offset-3.text-center
a(href='/') Maybe later
.spacer
.spacer
script.
$(function() {
$('#commit-btn-submit').click(function() {