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.get('/nonprofits/home', nonprofitController.nonprofitsHome);
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/in-exchange-we-ask', nonprofitController.inExchangeWeAsk);
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/link-us-to-your-website', nonprofitController.linkUsToYourWebsite);
app.get('/nonprofits/tell-us-your-name', nonprofitController.tellUsYourName);
app.get('/nonprofits/tell-us-your-email', nonprofitController.tellUsYourEmail);
app.get('/nonprofits/your-nonprofit-project-application-has-been-submitted', nonprofitController.yourNonprofitProjectApplicationHasBeenSubmitted);
app.get('/nonprofits/other-solutions', nonprofitController.otherSolutions);
app.get(
'/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) {
res.render('nonprofits/are-there-people-that-are-already-benefiting-from-your-services', {
title: 'Are there people already benefiting from your services',
step: 3
step: 2
});
};
exports.okWithJavaScript = function(req, res) {
res.render('nonprofits/ok-with-javascript', {
title: 'Are you OK with us using JavaScript',
step: 4
step: 3
});
};
exports.inExchangeWeAsk = function(req, res) {
res.render('nonprofits/in-exchange-we-ask', {
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
});
};
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) {
res.render('nonprofits/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) {
res.render('nonprofits/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) {
res.render('nonprofits/tell-us-your-email', {
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) {
res.render('nonprofits/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) {
res.render('nonprofits/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;
}
.gray-text {
color: gray;
.checkbox-table label {
margin-left: 10px;
}
//uncomment this to see the dimensions of all elements outlined in red
//* {
// border-color: red;

View File

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

View File

@ -12,6 +12,6 @@ block content
.spacer
.row
.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
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
h2 Please tell us your name
.spacer
.formgroup
.input-group
input.form-control.big-text-field.field-responsive(type='text', maxlength='140', autofocus='')
span.input-group-btn
button.btn.btn-big.btn-primary.btn-responsive(href='/nonprofits/tell-us-your-email') Submit
form(role='form', action="/nonprofits/tell-us-your-name-post", method='POST', novalidate='novalidate', name='nonprofitForm')
.formgroup
.input-group
input.form-control.big-text-field.field-responsive(type='text', maxlength='140', autofocus='')
span.input-group-btn
button.btn.btn-big.btn-primary.btn-responsive Submit