summaryrefslogtreecommitdiff
path: root/web/scripts/growth.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/scripts/growth.js')
-rw-r--r--web/scripts/growth.js35
1 files changed, 35 insertions, 0 deletions
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;
+}