diff options
| author | Jesse Morgan <jesse@jesterpm.net> | 2014-02-01 12:59:08 -0800 | 
|---|---|---|
| committer | Jesse Morgan <jesse@jesterpm.net> | 2014-02-01 12:59:08 -0800 | 
| commit | 81ec2b78d55d2eeafb68b523b47c003ff8c2f021 (patch) | |
| tree | 026dc95437da3fd41df20c99b3a455bc0135054d | |
| parent | 15f639c2258f227988af4f8ed4252820fcfc1188 (diff) | |
Adding classes form to assessment results page.
| -rw-r--r-- | src/templates/templates/assessment-results.ftl | 75 | ||||
| -rw-r--r-- | web/scripts/growth.js | 35 | ||||
| -rw-r--r-- | web/style.css | 6 | 
3 files changed, 115 insertions, 1 deletions
diff --git a/src/templates/templates/assessment-results.ftl b/src/templates/templates/assessment-results.ftl index 95ee7af..8f91823 100644 --- a/src/templates/templates/assessment-results.ftl +++ b/src/templates/templates/assessment-results.ftl @@ -24,10 +24,83 @@              will produce positive quantifiable and quality results in your life, as              you learn, and then apply this learning in your life.          </p> + +        <h2>GROW Classes</h2> + +        <p> +            We want to launch GROW with great momentum, and personally provide +            you with great momentum.  As a part of the launch of GROW we will +            be having GROW classes starting in March.  Please take a moment and +            complete the short form below, and help us plan and prepare to give +            you the best possible experience. +        </p> + +        <form id="classform" action="http://www.myfoursquarechurch.com/grow-classes/#response" method="post"> +            <input type="hidden" name="formid" value="136"> + +            <div> +                <label for="lastname">Last Name</label>: +                <input type="text" name="r[1]" id="lastname" value=""> +            </div> + +            <div> +                <label for="firstname">First Name</label>: +                <input type="text" name="r[2]" id="firstname" value=""> +            </div> + +            <div> +                <label for="phone">Phone</label>: +            <input type="text" name="r[3]" id="phone" value=""> +            </div> + +            <div> +                <label for="email">Email</label>: +                <input type="text" id="email" name="r[11]" value=""> +            </div> + +            <div> +                <p> +                    Will you be attending the GROW classes beginning the week of March 3rd? +                </p> + +                <div class="grouping"> +                    <div class="groupingitem"> +                        <label class="check"><input type="radio" name="r[6]" value="Yes">Yes</label> +                    </div> + +                    <div class="groupingitem"> +                        <label class="check"><input type="radio" name="r[6]" value="No">No</label> +                    </div> +                </div> +            </div> + +            <h3>GROW Class Schedule</h3> + +            <p> +                If you selected YES to attend the GROW classes in March, +                please select the class you are most likely to attend: +            </p> + +            <div> +                <label class="check"><input type="checkbox" name="r[10]" value="Midweek Morning - 6am">Midweek Morning - 6am</label> +            </div> + +            <div> +                <label class="check"><input type="checkbox" name="r[10]" value="Midweek Evening - 6pm">Midweek Evening - 6pm</label> +            </div> + +            <div> +                <label class="check"><input type="checkbox" name="r[10]" value="Midweek Evening - 7:30pm">Midweek Evening - 7:30pm</label> +            </div> + +            <div> +                <label class="check"><input type="checkbox" name="r[10]" value="Saturday Morning - 9am">Saturday Morning - 9am</label> +            </div> +        </form>      </@content>      <div id="getstarted"> -        <a class="greenbutton" href="${dynamicRoot}/account/training/introduction">Begin GROWing ➙</a> +        <a class="greenbutton" onclick="return submitClassForm()" href="${dynamicRoot}/account/training/introduction">Begin GROWing ➙</a>      </div>  </@commonpage> diff --git a/web/scripts/growth.js b/web/scripts/growth.js index fa5e3a9..8e56afd 100644 --- a/web/scripts/growth.js +++ b/web/scripts/growth.js @@ -247,3 +247,38 @@ function chapterComplete()      notice("You've completed this chapter!");      location.href += "/completed";  } + +function submitClassForm() +{ +    notice("Submitting Class Form..."); + +    var firstname = $("#firstname").val(); +    var lastname = $("#lastname").val(); +    var phone = $("#phone").val(); +    var email = $("#email").val(); + +    if (firstname == "") { +        alert("First name is required."); +        return false; +    } else if (lastname == "") { +        alert("Last name is required."); +        return false; +    } else if (phone == "") { +        alert("Phone is required."); +        return false; +    } else if (email == "") { +        alert("Email is required."); +        return false; +    } + +    $.ajax({ +        type: "POST", +        url: "http://www.myfoursquarechurch.com/grow-classes/#response", +        data: $("#classform").serialize(), +        dataType: html, +    }).always(function() { +        location.href="/account/training/introduction"; +    }); + +    return false; +} diff --git a/web/style.css b/web/style.css index d537d3a..a55377a 100644 --- a/web/style.css +++ b/web/style.css @@ -28,6 +28,12 @@ label {      display: inline-block;  } +label.check { +    text-align: left; +    width: 100%; +    display: block; +} +  blockquote {      font-style: italic;  }  | 
