From 5bab8009486c880453c74ffb6be131ac0abc420b Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Mon, 23 Dec 2013 19:14:39 -0500 Subject: [PATCH] Added contact form Uses AYAH integration in PICKLES --- config.php | 6 +++++ modules/contact.php | 8 ++++++ modules/contact/send.php | 26 +++++++++++++++++++ modules/legal/privacy.php | 8 ++++++ modules/legal/terms.php | 8 ++++++ templates/contact.phtml | 47 +++++++++++++++++++++++++++++++++++ templates/legal/privacy.phtml | 2 +- templates/legal/terms.phtml | 2 +- 8 files changed, 105 insertions(+), 2 deletions(-) create mode 100644 modules/contact.php create mode 100644 modules/contact/send.php create mode 100644 modules/legal/privacy.php create mode 100644 modules/legal/terms.php diff --git a/config.php b/config.php index e834dca..97ec1ae 100644 --- a/config.php +++ b/config.php @@ -94,6 +94,12 @@ $config = array( 'name' => 'LeaderBin', 'domain' => 'leaderbin.com', ), + 'api' => array( + 'ayah' => array( + 'publisher_key' => '12605450c23a1a6cff00b387ffe673dd9d2a27fe', + 'scoring_key' => '79b499385530453f43026ec58347564bbc08b8c2', + ), + ), ); ?> diff --git a/modules/contact.php b/modules/contact.php new file mode 100644 index 0000000..f037e23 --- /dev/null +++ b/modules/contact.php @@ -0,0 +1,8 @@ + diff --git a/modules/contact/send.php b/modules/contact/send.php new file mode 100644 index 0000000..72a5f97 --- /dev/null +++ b/modules/contact/send.php @@ -0,0 +1,26 @@ + +

Our system has determined that you may not be a human being.

+

If you happen to be Lil Wayne please contact us as we’d love to hear about how you’re using our service.

+

If you are not Lil Wayne, please go back and try the challenge game again.

+ + diff --git a/modules/legal/privacy.php b/modules/legal/privacy.php new file mode 100644 index 0000000..0b6d8b9 --- /dev/null +++ b/modules/legal/privacy.php @@ -0,0 +1,8 @@ + diff --git a/modules/legal/terms.php b/modules/legal/terms.php new file mode 100644 index 0000000..f411dc7 --- /dev/null +++ b/modules/legal/terms.php @@ -0,0 +1,8 @@ + diff --git a/templates/contact.phtml b/templates/contact.phtml index e69de29..01419c7 100644 --- a/templates/contact.phtml +++ b/templates/contact.phtml @@ -0,0 +1,47 @@ + +
+ +
Your message has been sent!
+ +

Get in touch

+ html->div( + array('class' => 'form-group'), + $this->html->inputEmail(array( + 'label' => 'Email Address', + 'name' => 'email', + 'class' => 'form-control input-lg email required', + )) + ); + + echo $this->html->div( + array('class' => 'form-group'), + $this->html->input(array( + 'label' => 'Subject', + 'name' => 'subject', + 'class' => 'form-control input-lg required', + 'minlength' => 10, + )) + ); + + echo $this->html->div( + array('class' => 'form-group'), + $this->html->textarea(array( + 'label' => 'Message', + 'name' => 'message', + 'class' => 'form-control input-lg required', + 'minlength' => 10, + 'placeholder' => 'Bonus points for keeping it under 140 character.', + 'rows' => 5, + )) + ); + + echo API_AYAH::getHTML() . '
'; + ?> + +
diff --git a/templates/legal/privacy.phtml b/templates/legal/privacy.phtml index 85d38d9..e45f6d9 100644 --- a/templates/legal/privacy.phtml +++ b/templates/legal/privacy.phtml @@ -1,6 +1,6 @@

config->site['name']; ?> Privacy Policy

-

Updated: December 23rd, 2013

+

Updated: December 23rd, 2013

Your Data

We take privacy seriously and respect the privacy of our users and the privacy of their data. The following discloses our information gathering and dissemination practices of this website. Although we own the data storage, databases and the Site itself, you retain all rights to your data.

diff --git a/templates/legal/terms.phtml b/templates/legal/terms.phtml index c8742eb..7e8d678 100644 --- a/templates/legal/terms.phtml +++ b/templates/legal/terms.phtml @@ -1,6 +1,6 @@

Terms of Service

-

Updated: December 23rd, 2013

+

Updated: December 23rd, 2013

Welcome to site['name']; ?>

By using or accessing site['domain']; ?>, including any sub domains of site['domain']; ?> (collectively, the “Site”), you agree to the following terms and conditions (“Terms of Service”).