continue work on the param-based funnel

This commit is contained in:
Michael Q Larson
2015-03-26 23:33:52 -07:00
parent d64b5c5718
commit e78609171d
7 changed files with 80 additions and 57 deletions

5
app.js
View File

@ -277,16 +277,17 @@ app.get('/nonprofits', contactController.getNonprofitsForm);
app.post('/nonprofits', contactController.postNonprofitsForm); app.post('/nonprofits', contactController.postNonprofitsForm);
app.get('/nonprofits/home', nonprofitController.nonprofitsHome); app.get('/nonprofits/home', nonprofitController.nonprofitsHome);
app.get('/nonprofits/are-you-with-a-registered-nonprofit', nonprofitController.areYouWithARegisteredNonprofit); app.get('/nonprofits/are-you-with-a-registered-nonprofit', nonprofitController.areYouWithARegisteredNonprofit);
app.get('/nonprofits/how-can-free-code-camp-help-you', nonprofitController.howCanFreeCodeCampHelpYou);
app.get('/nonprofits/are-there-people-that-are-already-benefiting-from-your-services', nonprofitController.areTherePeopleThatAreAlreadyBenefitingFromYourServices); app.get('/nonprofits/are-there-people-that-are-already-benefiting-from-your-services', nonprofitController.areTherePeopleThatAreAlreadyBenefitingFromYourServices);
app.get('/nonprofits/in-exchange-we-ask', nonprofitController.inExchangeWeAsk); app.get('/nonprofits/in-exchange-we-ask', nonprofitController.inExchangeWeAsk);
app.get('/nonprofits/ok-with-javascript', nonprofitController.okWithJavaScript); app.get('/nonprofits/ok-with-javascript', nonprofitController.okWithJavaScript);
app.get('/nonprofits/other-solutions', nonprofitController.otherSolutions); app.get('/nonprofits/how-can-free-code-camp-help-you', nonprofitController.howCanFreeCodeCampHelpYou);
app.post('/nonprofits/how-can-free-code-camp-help-you', nonprofitController.howCanFreeCodeCampHelpYouPost);
app.get('/nonprofits/what-does-your-nonprofit-do', nonprofitController.whatDoesYourNonprofitDo); app.get('/nonprofits/what-does-your-nonprofit-do', nonprofitController.whatDoesYourNonprofitDo);
app.get('/nonprofits/link-us-to-your-website', nonprofitController.linkUsToYourWebsite); app.get('/nonprofits/link-us-to-your-website', nonprofitController.linkUsToYourWebsite);
app.get('/nonprofits/tell-us-your-name', nonprofitController.tellUsYourName); app.get('/nonprofits/tell-us-your-name', nonprofitController.tellUsYourName);
app.get('/nonprofits/tell-us-your-email', nonprofitController.tellUsYourEmail); app.get('/nonprofits/tell-us-your-email', nonprofitController.tellUsYourEmail);
app.get('/nonprofits/your-nonprofit-project-application-has-been-submitted', nonprofitController.yourNonprofitProjectApplicationHasBeenSubmitted); app.get('/nonprofits/your-nonprofit-project-application-has-been-submitted', nonprofitController.yourNonprofitProjectApplicationHasBeenSubmitted);
app.get('/nonprofits/other-solutions', nonprofitController.otherSolutions);
app.get( app.get(
'/done-with-first-100-hours', '/done-with-first-100-hours',

View File

@ -27,35 +27,47 @@ exports.areYouWithARegisteredNonprofit = function(req, res) {
}); });
}; };
exports.howCanFreeCodeCampHelpYou = function(req, res) {
res.render('nonprofits/how-can-free-code-camp-help-you', {
title: 'Are you with a with a registered nonprofit',
step: 2
});
};
exports.areTherePeopleThatAreAlreadyBenefitingFromYourServices = function(req, res) { exports.areTherePeopleThatAreAlreadyBenefitingFromYourServices = function(req, res) {
res.render('nonprofits/are-there-people-that-are-already-benefiting-from-your-services', { res.render('nonprofits/are-there-people-that-are-already-benefiting-from-your-services', {
title: 'Are there people already benefiting from your services', title: 'Are there people already benefiting from your services',
step: 3 step: 2
}); });
}; };
exports.okWithJavaScript = function(req, res) { exports.okWithJavaScript = function(req, res) {
res.render('nonprofits/ok-with-javascript', { res.render('nonprofits/ok-with-javascript', {
title: 'Are you OK with us using JavaScript', title: 'Are you OK with us using JavaScript',
step: 4 step: 3
}); });
}; };
exports.inExchangeWeAsk = function(req, res) { exports.inExchangeWeAsk = function(req, res) {
res.render('nonprofits/in-exchange-we-ask', { res.render('nonprofits/in-exchange-we-ask', {
title: 'In exchange we ask that you ...', title: 'In exchange we ask that you ...',
step: 4
});
};
exports.howCanFreeCodeCampHelpYou = function(req, res) {
res.render('nonprofits/how-can-free-code-camp-help-you', {
title: 'Are you with a with a registered nonprofit',
step: 5 step: 5
}); });
}; };
exports.howCanFreeCodeCampHelpYouPost = function(req, res) {
var queryString = '';
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
if (req.body.websites) { queryString += 'websites&'}
res.redirect('/nonprofits/tell-us-your-name?' + encodeURIComponent(queryString));
};
exports.whatDoesYourNonprofitDo = function(req, res) { exports.whatDoesYourNonprofitDo = function(req, res) {
res.render('nonprofits/what-does-your-nonprofit-do', { res.render('nonprofits/what-does-your-nonprofit-do', {
title: 'What does your nonprofit do?', title: 'What does your nonprofit do?',
@ -63,6 +75,10 @@ exports.whatDoesYourNonprofitDo = function(req, res) {
}); });
}; };
exports.whatDoesYourNonprofitDoPost = function(req, res) {
res.redirect('nonprofits/link-us-to-your-website?' + req.params);
};
exports.linkUsToYourWebsite = function(req, res) { exports.linkUsToYourWebsite = function(req, res) {
res.render('nonprofits/link-us-to-your-website', { res.render('nonprofits/link-us-to-your-website', {
title: 'Link us to your website', title: 'Link us to your website',
@ -70,6 +86,10 @@ exports.linkUsToYourWebsite = function(req, res) {
}); });
}; };
exports.linkUsToYourWebsitePost = function(req, res) {
res.redirect('nonprofits/tell-us-your-email?' + req.params);
};
exports.tellUsYourEmail = function(req, res) { exports.tellUsYourEmail = function(req, res) {
res.render('nonprofits/tell-us-your-email', { res.render('nonprofits/tell-us-your-email', {
title: 'Tell us your name', title: 'Tell us your name',
@ -77,6 +97,10 @@ exports.tellUsYourEmail = function(req, res) {
}); });
}; };
exports.tellUsYourEmailPost = function(req, res) {
res.redirect('nonprofits/tell-us-your-name?' + req.params);
};
exports.tellUsYourName = function(req, res) { exports.tellUsYourName = function(req, res) {
res.render('nonprofits/tell-us-your-name', { res.render('nonprofits/tell-us-your-name', {
title: 'Tell us your name', title: 'Tell us your name',
@ -84,6 +108,10 @@ exports.tellUsYourName = function(req, res) {
}); });
}; };
exports.tellUsYourNamePost = function(req, res) {
};
exports.yourNonprofitProjectApplicationHasBeenSubmitted = function(req, res) { exports.yourNonprofitProjectApplicationHasBeenSubmitted = function(req, res) {
res.render('nonprofits/your-nonprofit-project-application-has-been-submitted', { res.render('nonprofits/your-nonprofit-project-application-has-been-submitted', {
title: 'Your Nonprofit Project application has been submitted!' title: 'Your Nonprofit Project application has been submitted!'

View File

@ -880,9 +880,10 @@ iframe.iphone {
background-color: #EEEEEE; background-color: #EEEEEE;
} }
.gray-text { .checkbox-table label {
color: gray; margin-left: 10px;
} }
//uncomment this to see the dimensions of all elements outlined in red //uncomment this to see the dimensions of all elements outlined in red
//* { //* {
// border-color: red; // border-color: red;

View File

@ -7,6 +7,6 @@ block content
.spacer .spacer
.row .row
.col-xs-6 .col-xs-6
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Yes a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/are-there-people-that-are-already-benefiting-from-your-services') Yes
.col-xs-6 .col-xs-6
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') No a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') No

View File

@ -4,39 +4,31 @@ block content
h1.hug-top Nonprofit Sign Up h1.hug-top Nonprofit Sign Up
include ../partials/nonprofit-application-progress-bar include ../partials/nonprofit-application-progress-bar
h2 How can Free Code Camp help you? h2 How can Free Code Camp help you?
.spacer form.text-left.form-inline(role='form', method='POST', action="/nonprofits/how-can-free-code-camp-help-you/")
.row.text-center.negative-35 input(type='hidden', name='_csrf', value=_csrf)
.col-xs-12.col-sm-12.col-md-3 h3.col-xs-12.col-sm-offset-5.checkbox-table
.landing-skill-icon.ion-android-globe .col-xs-12
label.black-text.nonprofit-help-select-text-height Websites input.checkbox(type='checkbox', name='websites')
input#websites-help.checkbox(type='checkbox') label.ion-android-globe   Websites
.col-xs-12.col-sm-12.col-md-3 .col-xs-12
.landing-skill-icon.ion-card input.checkbox(type='checkbox', name='donation-systems')
h2.black-text.nonprofit-help-select-text-height Donation Systems label.ion-card   Donation Systems
input#websites-help.checkbox(type='checkbox') .col-xs-12
.col-xs-12.col-sm-12.col-md-3 input.checkbox(type='checkbox', name='volunteer-systems')
.landing-skill-icon.ion-android-calendar label.ion-android-calendar   Volunteer Systems
h2.black-text.nonprofit-help-select-text-height Volunteer Systems .col-xs-12
input#websites-help.inline.checkbox(type='checkbox') input.checkbox(type='checkbox', name='inventory-systems')
.col-xs-12.col-sm-12.col-md-3 label.ion-ios-box   Inventory Systems
.landing-skill-icon.ion-ios-box .col-xs-12
h2.black-text.nonprofit-help-select-text-height Inventory Systems input.checkbox(type='checkbox', name='e-learning-platforms')
input#websites-help.inline.checkbox(type='checkbox') label.ion-university   E-learning Platforms
.col-xs-12.col-sm-12.col-md-3 .col-xs-12
.landing-skill-icon.ion-university input.checkbox(type='checkbox', name='web-forms')
h2.black-text.nonprofit-help-select-text-height E-learning Platforms label.ion-ios-list   Web Forms
input#websites-help.inline.checkbox(type='checkbox') .col-xs-12
.col-xs-12.col-sm-12.col-md-3 input.checkbox(type='checkbox', name='community-tools')
.landing-skill-icon.ion-ios-list label.ion-ios-people   Community Tools
h2.black-text.nonprofit-help-select-text-height Web Forms .col-xs-12
input#websites-help.inline.checkbox(type='checkbox') input.checkbox(type='checkbox', name='other-tools')
.col-xs-12.col-sm-12.col-md-3 label.ion-settings   Other tools
.landing-skill-icon.ion-ios-people button.btn.btn-primary.btn-big.btn-block(type='submit') I've selected all that apply and am ready to move on
h2.black-text.nonprofit-help-select-text-height Community Tools
input#websites-help.inline.checkbox(type='checkbox')
.col-xs-12.col-sm-12.col-md-3
.landing-skill-icon.ion-settings
h2.black-text.nonprofit-help-select-text-height ...and other tools
input#websites-help.inline.checkbox(type='checkbox')
.spacer
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/are-there-people-that-are-already-benefiting-from-your-services') I've selected all that apply and am ready to move on

View File

@ -12,6 +12,6 @@ block content
.spacer .spacer
.row .row
.col-xs-6 .col-xs-6
a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/what-does-your-nonprofit-do') Sounds good! a.btn.btn-primary.btn-big.btn-block(href='/nonprofits/how-can-free-code-camp-help-you') Sounds good!
.col-xs-6 .col-xs-6
a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') This might not be for us. a.btn.btn-warning.btn-big.btn-block(href='/nonprofits/other-solutions') This might not be for us.

View File

@ -5,8 +5,9 @@ block content
include ../partials/nonprofit-application-progress-bar include ../partials/nonprofit-application-progress-bar
h2 Please tell us your name h2 Please tell us your name
.spacer .spacer
form(role='form', action="/nonprofits/tell-us-your-name-post", method='POST', novalidate='novalidate', name='nonprofitForm')
.formgroup .formgroup
.input-group .input-group
input.form-control.big-text-field.field-responsive(type='text', maxlength='140', autofocus='') input.form-control.big-text-field.field-responsive(type='text', maxlength='140', autofocus='')
span.input-group-btn span.input-group-btn
button.btn.btn-big.btn-primary.btn-responsive(href='/nonprofits/tell-us-your-email') Submit button.btn.btn-big.btn-primary.btn-responsive Submit