Permalink
Browse files

contact form

  • Loading branch information...
1 parent d385ce2 commit 3ce4385d6eff503120f2cb854ab99a6691a59808 @midnightmonster midnightmonster committed Apr 14, 2012
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -38,7 +38,7 @@
<div class="hero-unit"><div class="sidekick">
<h1>Charter</h1>
<p>Need to charter a jet? Our broad range of charter partners enable us to create options that meet your travel needs, even at the last minute. </p>
- <p><a class="btn btn-primary btn-large">Contact Us &raquo;</a></p>
+ <p><a href="contact.html" class="btn btn-primary btn-large">Contact Us &raquo;</a></p>
</div></div>
<!-- /Hero Unit -->
<!-- One Column -->
View
@@ -11,6 +11,35 @@
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
+ <link href="css/kafoof.bootstrap.css" rel="stylesheet">
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+ <script src="js/kafoof.min.js"></script>
+ <script>
+ var setupForm = function(k){
+ k.serializeDefinition('#form-definition');
+ var kv = Kafoof.validate();
+ kv.disable();
+ $(this).closest('form').submit(function(e){
+ if(!kv.run()) return false;
+ e.preventDefault();
+ $button = $(this).find('button').attr('disabled',true);
+ $.post(this.action,$(this).find(':input').serialize())
+ .success(function(){
+ $('.form-submit').toggle();
+ }).error(function(){
+ alert('Your message could not be sent. We apologize for the inconvenience.');
+ }).complete(function(){
+ $button.attr('disabled',false);
+ });
+ return false;
+ });
+ };
+ Kafoof.load('#contact-form',{topics:[
+ 'Acquiring a business jet',
+ 'Selling a business jet',
+ 'Business jet consultations'
+ ]},{}).render(setupForm);
+ </script>
</head>
<body>
@@ -36,72 +65,43 @@
<div class="container">
<!-- Hero Unit -->
- <div class="hero-unit"><div class="sidekick">
- <h1>Kitties are so cute</h1>
- <p>If you had your own plane, you could take your kitty on board with you. You wouldn't have to use a pet carrier or deal with the other hassles of travel with pets. Don't you wish you could take your kitty on your private jet?</p>
- <p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p>
- </div></div>
- <!-- /Hero Unit -->
- <!-- One Column -->
- <h1>Example One-Column Section</h1>
- <p>The text goes pretty wide this way. Not going to be beautiful or easy to read in most cases. Did I mention that kitties are so cute? Oh the darling kitties!</p>
- <!-- /One Column -->
- <!-- Image on Right -->
- <div class="row">
- <div class="span7">
- <h1>Image on the right</h1>
- <ul>
- <li>When you do these images it's very important</li>
- <li>That you not leave the img src pointing to the assets folder</li>
- <li>Because that won't be accessible on the website</li>
- </ul>
- </div>
- <img class="span5" src="../assets/cit_cj2_ext02_hires.jpg" alt="">
- </div>
- <!-- /Image on Right -->
- <!-- Two Column -->
- <h1>Example Two-Column Section</h1>
- <div class="row">
- <div class="span6">
- <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.</p>
- </div>
- <div class="span6">
- <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.</p>
- </div>
- </div>
- <!-- /Two Column -->
- <!-- Image on Left -->
- <div class="row">
- <img class="span5" src="../assets/G001_high_resolution.jpg" alt="">
- <div class="span7">
- <h1>Image on the left</h1>
- <ul>
- <li>It's also important</li>
- <li>To scale these to a reasonable size when you save them in the www/img folder</li>
- <li>Right now I'm having the browser do it, and that's a big waste of bandwidth and memory</li>
- </ul>
- </div>
- </div>
- <!-- /Image on Left -->
- <!-- Three Column -->
- <div class="row">
- <div class="span4">
- <h2>Three</h2>
- <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <div class="hero-unit with-butler">
+ <div class="butler">
+ <p>jet<i>forward</i> Aviation<br>973 Summerleaf Drive<br>Suite 101<br>San Jose, CA 95120</p>
+ <p>Phone: 408.674.8708<br>Fax: 408.852.0303</p>
</div>
- <div class="span4">
- <h2>Columns</h2>
- <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
- </div>
- <div class="span4">
- <h2>Are Nice</h2>
- <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
- <p><a class="btn" href="#">View details &raquo;</a></p>
+ <div class="sidekick"><form action="contact.php" method="post" style="margin:0" id="contact">
+ <h1 style="margin:0">Contact Us</h1>
+ <div id="contact-form"><textarea style="display:none">
+-- @contact -----------------------
+
+Let's talk about
+[______________________________[^]]
+
+Your message
++---------------------------------+
++ +
++ +
++---------------------------------+
+
+Your name Preferred phone
+[_______________] [_______________]
+
+Your email address
+[_________________________________]
+-----------------------------------
+* topic; from:topics; prompt:Choose...
++ message
+* name
+* phone
++ email; validate:EMAIL
+ </textarea></div>
+ <p class="form-submit"><button type="submit" class="btn btn-primary btn-large">Send Message</button><input type="hidden" name="form-definition" id="form-definition"></p>
+ <div class="form-submit alert" style="display:none">
+ <b>Thank you!</b> Your message has been sent.
</div>
- </div>
- <!-- /Three Column -->
+ </form></div></div>
+ <!-- /Hero Unit -->
</div> <!-- /container -->
<div class="footer">
<div class="container">
View
@@ -0,0 +1,14 @@
+<?php
+if(empty($_POST['email'])) die('fail');
+require 'lib/SimpleEmail.php';
+require 'lib/preview_view.php';
+require 'lib/KafoofPreview.php';
+$preview = new KafoofPreview($_POST);
+ob_start();
+foreach($preview->sections() as $s) kafoof_section($s);
+$_POST['body'] = ob_get_clean();
+$mail = new SimpleEmail('contact.template');
+if(!$mail->send($_POST)) {
+ throw new Exception('Email send failed');
+}
+die('ok');
View
@@ -0,0 +1,6 @@
+To: info@jetforwardaviation.com
+From: {{email}}
+Subject: Contact Form: {{topic}}
+Content-type: text/html
+
+<html><body>{{body}}</body></html>
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -52,7 +52,10 @@ div.navbar-fixed-top .nav {
}
div.hero-unit { background:#222 url(../img/hero-bw.jpg) right center no-repeat; padding:0 373px 0 0; color:#eee; margin:0 -4px 30px;}
+div.with-butler { background-image:none; }
div.sidekick { border-right:2px solid #841114; padding:40px; }
+div.butler { float:right; width:293px; padding:30px 40px; margin-right:-373px; }
+div.with-butler div.sidekick { padding:30px 40px; }
.hero-unit h1 { color:#c8bdb5; font-size:32px; margin:0 0 12px;}
h1, h2 {margin:18px 0 9px; }

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit 3ce4385

Please sign in to comment.