From d328842bda0f4a1f7700ba6ccd6b009cd467cb8f Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 13 Jan 2015 12:50:00 -0800 Subject: [PATCH 1/4] only partially working --- public/js/main.js | 6 ++++++ views/contact.jade | 30 +++++++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index d3e56ed6bf..829a416b63 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -68,6 +68,12 @@ profileValidation.controller('emailSignInController', ['$scope', } ]); +profileValidation.controller('nonprofitFormController', ['$scope', + function($scope) { + + } +]); + profileValidation.directive('uniqueUsername', function($http) { return { restrict: 'A', diff --git a/views/contact.jade b/views/contact.jade index 55d4cd8fe5..f6c7739248 100644 --- a/views/contact.jade +++ b/views/contact.jade @@ -14,22 +14,34 @@ block content li • Understand that they will build your project using JavaScript frameworks (as opposed to older or proprietary tools) li • Keep your expectations high. Our students' goal is to produce work that's up to your standards h3 If you're OK with these terms, great! We'd love to help you! Fill in this form and we'll get right back to you. - form.form-horizontal(role='form', action="/nonprofits/", method='POST') + form.form-horizontal(role='form', action="/nonprofits/", method='POST', novalidate='novalidate', name='nonprofitForm') input(type='hidden', name='_csrf', value=_csrf) .form-group - label(class='col-sm-2 control-label', for='name') Your name + label(class='col-sm-2 control-label', for='name') Your name * .col-sm-8 - input.form-control(type='text', name='name', id='name') + input.form-control(type='text', name='name', id='name', autocomplete="off", ng-model='nonprofitForm.name', required='required') + .col-sm-8(ng-show="nonprofitForm.name.$invalid && nonprofitForm.name.$error.required && !nonprofitForm.name.$pristine") + alert(type='danger') + span.ion-close-circled(id='#name-error') + | Your name is required. .form-group - label(class='col-sm-2 control-label', for='email') Your email + label(class='col-sm-2 control-label', for='email') Your email * .col-sm-8 - input.form-control(type='text', name='email', id='email') + input.form-control(type='text', name='email', id='email', autocomplete="off", ng-model='nonprofitForm.email', required='required') + .col-sm-8(ng-show="nonprofitForm.email.$invalid && nonprofitForm.email.$error.required && !nonprofitForm.email.$pristine") + alert(type='danger') + span.ion-close-circled(id='#email-error') + | Your email is required. .form-group - label(class='col-sm-2 control-label', for='message') Briefly describe what problem you need to solve, and for whom. + label(class='col-sm-2 control-label', for='message') Briefly describe what problem you need to solve, and for whom. * .col-sm-8 - textarea.form-control(type='text', name='message', id='message', rows='7') + textarea.form-control(type='text', name='message', id='message', rows='7', autocomplete="off", ng-model='nonprofitForm.message', required='required') + .col-sm-8(ng-show="nonprofitForm.message.$invalid && nonprofitForm.message.$error.required && !nonprofitForm.message.$pristine") + alert(type='danger') + span.ion-close-circled(id='#message-error') + | Your message is required. .form-group .col-sm-offset-2.col-sm-8 - button.btn.btn-primary(type='submit') + button.btn.btn-primary(type='submit', ng-disabled='nonprofitForm.$invalid') span.ion-paper-airplane - | Submit + | Submit \ No newline at end of file From 9d3cf9f13f2cbea109c6ab26c86bf6422efa5077 Mon Sep 17 00:00:00 2001 From: Michael Q Larson Date: Tue, 13 Jan 2015 14:43:57 -0800 Subject: [PATCH 2/4] finish angularizing forms --- views/contact.jade | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/views/contact.jade b/views/contact.jade index f6c7739248..9695d21333 100644 --- a/views/contact.jade +++ b/views/contact.jade @@ -19,27 +19,27 @@ block content .form-group label(class='col-sm-2 control-label', for='name') Your name * .col-sm-8 - input.form-control(type='text', name='name', id='name', autocomplete="off", ng-model='nonprofitForm.name', required='required') - .col-sm-8(ng-show="nonprofitForm.name.$invalid && nonprofitForm.name.$error.required && !nonprofitForm.name.$pristine") + input.form-control(type='text', name='name', id='name', autocomplete="off", ng-model='name', required='required') + .col-sm-8.col-sm-offset-2(ng-show="nonprofitForm.name.$invalid && nonprofitForm.name.$error.required && !nonprofitForm.name.$pristine") alert(type='danger') span.ion-close-circled(id='#name-error') | Your name is required. .form-group label(class='col-sm-2 control-label', for='email') Your email * .col-sm-8 - input.form-control(type='text', name='email', id='email', autocomplete="off", ng-model='nonprofitForm.email', required='required') - .col-sm-8(ng-show="nonprofitForm.email.$invalid && nonprofitForm.email.$error.required && !nonprofitForm.email.$pristine") + input.form-control(type='text', name='email', id='email', autocomplete="off", ng-model='email', required='required') + .col-sm-8.col-sm-offset-2(ng-show="nonprofitForm.email.$invalid && nonprofitForm.email.$error.required && !nonprofitForm.email.$pristine") alert(type='danger') - span.ion-close-circled(id='#email-error') - | Your email is required. + span.ion-close-circled(id='#email-error'). + Your email is required. .form-group label(class='col-sm-2 control-label', for='message') Briefly describe what problem you need to solve, and for whom. * .col-sm-8 - textarea.form-control(type='text', name='message', id='message', rows='7', autocomplete="off", ng-model='nonprofitForm.message', required='required') - .col-sm-8(ng-show="nonprofitForm.message.$invalid && nonprofitForm.message.$error.required && !nonprofitForm.message.$pristine") + textarea.form-control(type='text', name='message', id='message', rows='7', autocomplete="off", ng-model='message', required='required') + .col-sm-8.col-sm-offset-2(ng-show="nonprofitForm.message.$invalid && nonprofitForm.message.$error.required && !nonprofitForm.message.$pristine") alert(type='danger') - span.ion-close-circled(id='#message-error') - | Your message is required. + span.ion-close-circled(id='#message-error') + | Your message is required. .form-group .col-sm-offset-2.col-sm-8 button.btn.btn-primary(type='submit', ng-disabled='nonprofitForm.$invalid') From 327f45f664b336ad177f004245958bb33470e48e Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 14 Jan 2015 10:35:02 -0500 Subject: [PATCH 3/4] Update faq.jade Fix spelling error (perservere to persevere) --- views/partials/faq.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/partials/faq.jade b/views/partials/faq.jade index 5a5b1ee186..d2962ea05e 100644 --- a/views/partials/faq.jade +++ b/views/partials/faq.jade @@ -70,7 +70,7 @@ p.landing-p Our name is Free Code Camp. We are a free code camp. If you had to pay us (or sign over future earnings), we'd have to change our name. And we are not going to do that. h2 Does Free Code Camp have an application process? ul - p.landing-p Unlike most bootcamps, anyone can study at Free Code Camp. We're not going to tell you that you can't become a software engineer. We believe the only person who should be able to tell you that is you. If you perservere, and keep working through our challenges and nonprofits' projects, you will become an employable software engineer. + p.landing-p Unlike most bootcamps, anyone can study at Free Code Camp. We're not going to tell you that you can't become a software engineer. We believe the only person who should be able to tell you that is you. If you persevere, and keep working through our challenges and nonprofits' projects, you will become an employable software engineer. br br .text-center From ac3b01dd8b4567564c42799ef25654004714b306 Mon Sep 17 00:00:00 2001 From: Michael Johnson Date: Wed, 14 Jan 2015 11:54:34 -0500 Subject: [PATCH 4/4] Update challenges.json Fixing typo in reference to issue https://github.com/FreeCodeCamp/freecodecamp/issues/25 --- seed_data/challenges.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed_data/challenges.json b/seed_data/challenges.json index 999acfd08f..7b324a05c4 100644 --- a/seed_data/challenges.json +++ b/seed_data/challenges.json @@ -165,7 +165,7 @@ "video": "114591799", "challengeNumber": 13, "steps": [ - "Now that we've built a foundation in jQuery, let's go back to Dash and do it's last challenge.", + "Now that we've built a foundation in jQuery, let's go back to Dash and do its last challenge.", "If you aren't familiar with Mad Libs, they basically involve inserting random nouns, adjectives and verbs in to stories. The stories that result are often hilarious.", "Go to https://dash.generalassemb.ly/projects/mad-libs-1 and complete the fifth project." ]