Skip to content

Commit

Permalink
contact form
Browse files Browse the repository at this point in the history
  • Loading branch information
midnightmonster committed Apr 14, 2012
1 parent d385ce2 commit 3ce4385
Show file tree
Hide file tree
Showing 13 changed files with 410 additions and 65 deletions.
Binary file added assets/bootstrap components.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/bootstrap settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion www/charter.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<div class="hero-unit"><div class="sidekick"> <div class="hero-unit"><div class="sidekick">
<h1>Charter</h1> <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>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> </div></div>
<!-- /Hero Unit --> <!-- /Hero Unit -->
<!-- One Column --> <!-- One Column -->
Expand Down
128 changes: 64 additions & 64 deletions www/contact.html
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![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> </head>


<body> <body>
Expand All @@ -36,72 +65,43 @@


<div class="container"> <div class="container">
<!-- Hero Unit --> <!-- Hero Unit -->
<div class="hero-unit"><div class="sidekick"> <div class="hero-unit with-butler">
<h1>Kitties are so cute</h1> <div class="butler">
<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>jet<i>forward</i> Aviation<br>973 Summerleaf Drive<br>Suite 101<br>San Jose, CA 95120</p>
<p><a class="btn btn-primary btn-large">Learn more &raquo;</a></p> <p>Phone: 408.674.8708<br>Fax: 408.852.0303</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> </div>
<div class="span4"> <div class="sidekick"><form action="contact.php" method="post" style="margin:0" id="contact">
<h2>Columns</h2> <h1 style="margin:0">Contact Us</h1>
<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 id="contact-form"><textarea style="display:none">
<p><a class="btn" href="#">View details &raquo;</a></p> -- @contact -----------------------
</div>
<div class="span4"> Let's talk about
<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> 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>
</div> </form></div></div>
<!-- /Three Column --> <!-- /Hero Unit -->
</div> <!-- /container --> </div> <!-- /container -->
<div class="footer"> <div class="footer">
<div class="container"> <div class="container">
Expand Down
14 changes: 14 additions & 0 deletions www/contact.php
Original file line number Original file line Diff line number Diff line change
@@ -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');
6 changes: 6 additions & 0 deletions www/contact.template
Original file line number Original file line Diff line number Diff line change
@@ -0,0 +1,6 @@
To: info@jetforwardaviation.com
From: {{email}}
Subject: Contact Form: {{topic}}
Content-type: text/html

<html><body>{{body}}</body></html>
Binary file added www/css/Kafoof.err.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions www/css/custom.css
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -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.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.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;} .hero-unit h1 { color:#c8bdb5; font-size:32px; margin:0 0 12px;}


h1, h2 {margin:18px 0 9px; } h1, h2 {margin:18px 0 9px; }
Expand Down
48 changes: 48 additions & 0 deletions www/css/kafoof.bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3ce4385

Please sign in to comment.