diff --git a/server/boot/commit.js b/server/boot/commit.js index 4ba0f3801e..5e613d65fd 100644 --- a/server/boot/commit.js +++ b/server/boot/commit.js @@ -106,10 +106,9 @@ export default function commit(app) { Object.assign( { title: 'Commit to a nonprofit. Commit to your goal.', - pledge, - frontEndCert: commitGoals.frontEndCert, - fullStackCert: commitGoals.fullStackCert + pledge }, + commitGoals, nonprofit ) ); diff --git a/server/utils/commit-goals.json b/server/utils/commit-goals.json index d9f20e47ff..9c7c69721b 100644 --- a/server/utils/commit-goals.json +++ b/server/utils/commit-goals.json @@ -1,4 +1,6 @@ { "frontEndCert": "Front End Development Certification", + "backEndCert": "Back End Development Certification", + "dataVisCert": "Data Visualisation Certification", "fullStackCert": "Full Stack Development Certification" } diff --git a/server/views/commit/index.jade b/server/views/commit/index.jade index 95a1928efe..44da121405 100644 --- a/server/views/commit/index.jade +++ b/server/views/commit/index.jade @@ -28,10 +28,10 @@ block content input(type='radio' id=frontEndCert value=frontEndCert name='goal' checked="checked") | Front End Development Certification (takes about 400 hours) label.btn.btn-primary.btn-lg - input(type='radio' id=fullStackCert value=dataVisCert name='goal') + input(type='radio' id=dataVisCert value=dataVisCert name='goal') | Data Visualization Certification (takes about 800 hours) label.btn.btn-primary.btn-lg - input(type='radio' id=fullStackCert value=backEndCert name='goal') + input(type='radio' id=backEndCert value=backEndCert name='goal') | Back End Development Certification (takes about 1,200 hours) label.btn.btn-primary.btn-lg input(type='radio' id=fullStackCert value=fullStackCert name='goal') @@ -91,6 +91,15 @@ block content }); $('#commit-btn-submit').click(function() { + + if ( + history && + typeof history.pushState === 'function' + ) { + history.pushState(history.state, null, '/commit/pledge?' + $('form').serialize()); + return null; + } + window.location.href = '/commit/pledge?' + $('form').serialize(); }); });