diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2013-08-27 08:28:16 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2013-08-27 08:28:16 -0700 |
commit | 1cdb43bb3e432040aed18c05e129f0131ee7d20a (patch) | |
tree | a4c5ad41d183b3874c990de0c5416d1810a1dc85 /src/templates | |
parent | 9b33aaf27cd8f73402ee9967c6b0fd76a90f8ebe (diff) |
Introducing F1 Authentication and Adding Site Content.
This change introduced the f1oauth and jesterpm oauth packages for
interacting with Fellowship One's developer API. I have also reworked
the login authentication to verify credentials through F1 and added
session management to track logged in users.
The Authenticator chain works as follows: on every page load we check
for a session cookie, if the cookie exists, the Request is marked as
authenticated and the OAuthUser object is restored in ClientInfo. If
this request is going to an account page, we require authentication. The
LoginFormAuthenticator checks if the user is already authenticated (via
cookie) and if not redirects the user to the login page. When the login
form is submitted, LoginFormAuthenticator catches the POST request and
authenticates the user through F1.
I'm also adding a new account page, but it is currently a work in
progress.
This commit also adds Allen's content to the site.
Diffstat (limited to 'src/templates')
-rw-r--r-- | src/templates/macros/common.ftl | 1 | ||||
-rw-r--r-- | src/templates/macros/textcontent.ftl | 8 | ||||
-rw-r--r-- | src/templates/pages/about.html.ftl | 69 | ||||
-rw-r--r-- | src/templates/pages/assessment.html.ftl | 44 | ||||
-rw-r--r-- | src/templates/pages/contact.html.ftl | 37 | ||||
-rw-r--r-- | src/templates/pages/index.html.ftl | 15 | ||||
-rw-r--r-- | src/templates/pages/login.html.ftl | 6 | ||||
-rw-r--r-- | src/templates/pages/newaccount.html.ftl | 26 | ||||
-rw-r--r-- | src/templates/pages/verification.html.ftl | 17 | ||||
-rw-r--r-- | src/templates/templates/assessment-results.ftl | 32 | ||||
-rw-r--r-- | src/templates/templates/getstarted-button.ftl | 7 | ||||
-rw-r--r-- | src/templates/templates/index-hero.ftl | 3 | ||||
-rw-r--r-- | src/templates/templates/stage-complete.ftl | 56 |
13 files changed, 299 insertions, 22 deletions
diff --git a/src/templates/macros/common.ftl b/src/templates/macros/common.ftl index 513fc57..966afdb 100644 --- a/src/templates/macros/common.ftl +++ b/src/templates/macros/common.ftl @@ -1,4 +1,5 @@ <#include "content.ftl"> +<#include "textcontent.ftl"> <#include "noticebox.ftl"> <#assign dynamicRoot = ""> diff --git a/src/templates/macros/textcontent.ftl b/src/templates/macros/textcontent.ftl new file mode 100644 index 0000000..408c05c --- /dev/null +++ b/src/templates/macros/textcontent.ftl @@ -0,0 +1,8 @@ +<#macro textcontent> + <div id="content"> + <article class="text"> + <#nested> + </article> + </div> +</#macro> + diff --git a/src/templates/pages/about.html.ftl b/src/templates/pages/about.html.ftl index 3ab2bc0..63cd366 100644 --- a/src/templates/pages/about.html.ftl +++ b/src/templates/pages/about.html.ftl @@ -3,22 +3,69 @@ <@commonpage> <@noticebox> - The Grow Process focuses on the topic that you want to learn - about. Out 'Assessment' test will give you the right courses - fit for your level. </@noticebox> - <@content> + <@textcontent> <h1>About</h1> + + <p> + GROW is a comprehensive spiritual formation tool that is + specifically designed to help you engage in the discipleship + process. + </p> + + <p> + Disciple means “learner” and our goal is to help you be an + effective learner and grow in the knowledge of Jesus Christ, the + Word of God, the essentials of your faith that will cause the + transformation God promises you will experience. And that + transformation will in turn change your life! + </p> + + <p> + Every individual is in one of four stages of spiritual formation: + <ul> + <li>Seeker</li> + <li>Believer</li> + <li>Disciple</li> + <li>Teacher</li> + </ul> + </p> + + <p> + Our goal is to help you identify where you are, and to help you get + to the next stage of development and spiritual maturity. Welcome + to GROW. + </p> + + <p> + GROW is an innovative process that incorporates multiple media + elements for learning; video, written material, interactive tools, + community forums, etc. + </p> + + <p> + GROW is web-based process designed to be experienced in a variety + of ways to meet all the possible scenarios for learning: + <ul> + <li>In a community group environment</li> + <li>In a small discipleship group of a couple of people</li> + <li>Direct one-on-one discipleship</li> + <li>Friends with friends</li> + <li>Husband and wife</li> + <li>At the coffee shop</li> + <li>In your kitchen or living room</li> + <li>By the pool</li> + </ul> + </p> + <p> - Curabitur mattis molestie ligula, ac vestibulum Curabitur - mattis facillisis vel. Iacus facillisis vel. Nam dignissim - massa luctus ipsum adipiscing dignissim. + Now it’s your turn to act! Get started now in your journey by + taking the GROW assessment. Identify your starting place as a + Seeker, Believer, Disciple or Teacher and be a disciple. </p> - </@content> + </@textcontent> - <div id="getstarted"> - <a class="greenbutton" href="index.html">Get Started! ➙</a> - </div> + <#include "/templates/getstarted-button.ftl"> </@commonpage> diff --git a/src/templates/pages/assessment.html.ftl b/src/templates/pages/assessment.html.ftl new file mode 100644 index 0000000..7903382 --- /dev/null +++ b/src/templates/pages/assessment.html.ftl @@ -0,0 +1,44 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + </@noticebox> + + <@textcontent> + <h1>Assessment</h1> + + <p> + Welcome to the start of GROW and the GROW personal assessment. The + purpose of this 18-question assessment will identify where you are + in the spiritual development process: + </p> + + <p> + <!-- TODO: Insert Image Here --> + **************** Insert the image here. ************************* + </p> + + <p> + Upon completion of the assessment, you will be invited to join the + process at the appropriate stage. For example if the assessment + returns a “believer” result, you will be invited to start the + Believer level of this process. + </p> + + <p> + Once you have completed this level, you will be invited to begin the next stage of GROW. + </p> + + <p> + Let’s get with your personal GROW assessment now, it will only take a few minutes. + </p> + + </@textcontent> + + <div id="getstarted"> + <a class="greenbutton" href="${dynamicRoot}/account/assessment">Begin Assessment ➙</a> + </div> +</@commonpage> + + diff --git a/src/templates/pages/contact.html.ftl b/src/templates/pages/contact.html.ftl index e69de29..40499cc 100644 --- a/src/templates/pages/contact.html.ftl +++ b/src/templates/pages/contact.html.ftl @@ -0,0 +1,37 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + </@noticebox> + + <@textcontent> + <h1>Contact Us</h1> + + <p> + If you have any questions about GROW, please complete the following + form, and we will be in touch soon, or call us at 253-848-9111. + </p> + + <form action="${dynamicRoot}/contactus" method="post"> + <p><label for="firstnameField">First Name:</label> <input id="firstnameField" type="text" name="firstname" /></p> + <p><label for="lastnameField">Last Name:</label> <input id="lastnameField" type="text" name="lastname" /></p> + <p><label for="emailField">Email:</label> <input id="emailField" type="text" name="email" /></p> + <p><label for="phoneField">Phone:</label> <input id="phoneField" type="text" name="phone" /></p> + <p> + Foursquare Member: + <label><input type="radio" name="member" value="yes" id="memberYes"> Yes</label> + <label><input type="radio" name="member" value="no" id="memberNo"> No</label> + </p> + <p> + Question:<br /> + <textarea name="question" rows="10" cols="80"></textarea> + </p> + <p><input type="submit" value="Send" /></p> + </form> + + </@textcontent> + +</@commonpage> + + diff --git a/src/templates/pages/index.html.ftl b/src/templates/pages/index.html.ftl index 4e6ea73..2788e8f 100644 --- a/src/templates/pages/index.html.ftl +++ b/src/templates/pages/index.html.ftl @@ -15,13 +15,16 @@ <h1>Grow "Buckets"</h1> <p> - Curabitur mattis molestie ligula, ac vestibulum Curabitur - mattis facillisis vel. Iacus facillisis vel. Nam dignissim - massa luctus ipsum adipiscing dignissim. + We want to help you GROW + </p> + <p> + GROW process is an on-line application and network to help you GROW + as a follower of Jesus Christ. + </p> + Let’s join together in a spiritual formation journey and begin the + discipleship process that will transform your life. </p> </@content> - <div id="getstarted"> - <a class="greenbutton" href="index.html">Get Started! ➙</a> - </div> + <#include "/templates/getstarted-button.ftl"> </@commonpage> diff --git a/src/templates/pages/login.html.ftl b/src/templates/pages/login.html.ftl index 590649c..2a27858 100644 --- a/src/templates/pages/login.html.ftl +++ b/src/templates/pages/login.html.ftl @@ -4,7 +4,7 @@ <@commonpage> <@noticebox> <#if errorMessage??> - ${errorMessage} + ${errorMessage?html} <#else> Welcome! </#if> @@ -12,7 +12,9 @@ <@content> <p>Welcome! You will need to login with your Foursquare Church InFellowship login.</p> - <form action="${dynamicRoot}/login.html" method="post"> + <p>If you do not already have an account, + <a href="${dynamicRoot}/newaccount.html">create one here</a>.</p> + <form action="${dynamicRoot}/account/authenticate?redirect=${redirect!""}" method="post"> <p><label for="emailField">Email:</label> <input id="emailField" type="text" name="email" /></p> <p><label for="passwordField">Password:</label> <input id="passwordField" type="password" name="password" /></p> <p><input type="submit" value="Login" /></p> diff --git a/src/templates/pages/newaccount.html.ftl b/src/templates/pages/newaccount.html.ftl new file mode 100644 index 0000000..780a5c8 --- /dev/null +++ b/src/templates/pages/newaccount.html.ftl @@ -0,0 +1,26 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + <#if errorMessage??> + ${errorMessage?html} + <#else> + Welcome! + </#if> + </@noticebox> + + <@content> + <p> + Fill out the form below to create a new Puyallup Foursquare InFellowship account. + </p> + <form action="${dynamicRoot}/createaccount" method="post"> + <p><label for="firstnameField">First Name:</label> <input id="firstnameField" type="text" name="firstname" /></p> + <p><label for="lastnameField">Last Name:</label> <input id="lastnameField" type="text" name="lastname" /></p> + <p><label for="emailField">Email:</label> <input id="emailField" type="text" name="email" /></p> + <p><input type="submit" value="Create Account" /></p> + </form> + </@content> +</@commonpage> + + diff --git a/src/templates/pages/verification.html.ftl b/src/templates/pages/verification.html.ftl new file mode 100644 index 0000000..e81b005 --- /dev/null +++ b/src/templates/pages/verification.html.ftl @@ -0,0 +1,17 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + </@noticebox> + + <@content> + <p> + We have sent you a verification email. + You will be taken back to the login page after you activate your account. + </p> + </@content> +</@commonpage> + + + diff --git a/src/templates/templates/assessment-results.ftl b/src/templates/templates/assessment-results.ftl new file mode 100644 index 0000000..98918ba --- /dev/null +++ b/src/templates/templates/assessment-results.ftl @@ -0,0 +1,32 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + </@noticebox> + + <@textcontent> + <p>Congratulations for completing your GROW assessment!</p> + + <p>Based on your responses you have been identified as a ${stage?cap_first}.</p> + + <p> + So what’s next? Now you begin the process of GROWing. The button + below will take you to the ${stage?cap_first} page. + </p> + + <p>Here you will find everything you need to begin the GROW process and start your journey.</p> + + <p> + We are genuinely excited for you. Each phase of the GROW process + will produce positive quantifiable and quality results in your life, as + you learn, and then apply this learning in your life. + </p> + </@textcontent> + + <div id="getstarted"> + <a class="greenbutton" href="${dynamicRoot}/account/training/${stage?lower_case}">Begin GROWing ➙</a> + </div> +</@commonpage> + + diff --git a/src/templates/templates/getstarted-button.ftl b/src/templates/templates/getstarted-button.ftl new file mode 100644 index 0000000..b0baaee --- /dev/null +++ b/src/templates/templates/getstarted-button.ftl @@ -0,0 +1,7 @@ +<div id="getstarted"> + <#if user??> + <a class="greenbutton" href="${dynamicRoot}/account">Get Started! ➙</a> + <#else> + <a class="greenbutton" href="login.html">Get Started! ➙</a> + </#if> +</div> diff --git a/src/templates/templates/index-hero.ftl b/src/templates/templates/index-hero.ftl index a386ac8..f447d53 100644 --- a/src/templates/templates/index-hero.ftl +++ b/src/templates/templates/index-hero.ftl @@ -1,7 +1,4 @@ <div id="hero"> <h1>We want to help you Grow.</h1> - <p>Grow Process is an online application and network that exists to - help you grow closter to God. Morbi iaculis turpis sit amet - vehicula sollicitudin, enim dolor condimentum</p> </div> diff --git a/src/templates/templates/stage-complete.ftl b/src/templates/templates/stage-complete.ftl new file mode 100644 index 0000000..ed04681 --- /dev/null +++ b/src/templates/templates/stage-complete.ftl @@ -0,0 +1,56 @@ +<#include "/macros/common.ftl"> +<#include "/macros/common-page.ftl"> + +<@commonpage> + <@noticebox> + </@noticebox> + + <@textcontent> + <h1>Congratulations!</h1> + + <p> + Congratulations on the completion of the ${stage?cap_first} level of the GROW process. + </p> + + <p> + We strongly encourage you move to the next stage of GROW. However, + before you do that, let’s review a key component to ensure you + experience the transformation and benefits of what you have already + learned: Implementation. + </p> + + <p> + Learning is important, we should all be continuous learners, + otherwise we stagnate. + </p> + + <p> + However to learn new information and then not implement or employ + that learning in our life, will make us smarter but not necessarily + wiser or better. + </p> + + <p> + For many there is a “knowing, doing gap” in their lives. They know + a lot, but they don’t do anything with what they know, and they remain + “stuck”. + </p> + + <p> + We know that for your new knowledge and learning to have an impact + on your life you must implement it. + </p> + + <p> + You were given some tips for how to act on the new knowledge you + have. We encourage you to be proactive and intentional in closing the + gap between what you know and what you do, to experience all that God + has for you. + </p> + + </@textcontent> + + <div id="getstarted"> + <a class="greenbutton" href="${dynamicRoot}/account/training/${nextstage}">Continue GROWing ➙</a> + </div> +</@commonpage> |