windhamdavid 5 years ago
parent
commit
a90e6864f3
7 changed files with 5218 additions and 20 deletions
  1. 2796 0
      css/form.css
  2. 2 2
      gruntfile.js
  3. 42 7
      inc/tweaks.php
  4. 2069 0
      js/form.js
  5. 160 0
      js/json.js
  6. 48 0
      page-contact.php
  7. 101 11
      style.css

File diff suppressed because it is too large
+ 2796 - 0
css/form.css


+ 2 - 2
gruntfile.js

@@ -13,8 +13,8 @@ module.exports = function(grunt) {
 		cssmin: {
 		  combine: {
 		    files: {
-		      'style.min.css': ['style.css', 'css/bootstrap.css', 'css/font-awesome.css', 'css/fullcalendar.css', 'css/animate.css'],
-			  'css/style-o.min.css': ['css/style-o.css', 'css/bootstrap.css'],
+		      'style.min.css': ['style.css', 'css/boot.css', 'css/font-awesome.css', 'css/fullcalendar.css', 'css/animate.css'],
+			  'css/style-o.min.css': ['css/style-o.css', 'css/boot.css'],
 			  'css/front.min.css': ['css/front-page.css']
 		    }
 		  }

+ 42 - 7
inc/tweaks.php

@@ -20,7 +20,7 @@ function dw_remove_wp_ver_css_js( $src ) {
 add_filter( 'style_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
 add_filter( 'script_loader_src', 'dw_remove_wp_ver_css_js', 9999 );
 
-
+add_action( 'admin_head', 'dw_hide' );
 function dw_hide() {
     ?>
     <style type="text/css" media="screen">
@@ -32,30 +32,65 @@ function dw_hide() {
 	#postexcerpt p {display: none;}
     </style>
 <?php }
-add_action( 'admin_head', 'dw_hide' );
-
 
+add_filter('wp_mail_from', 'dw_fromemail');
 function dw_fromemail($email) {
 	$wpfrom = get_option('admin_email');
     return $wpfrom;
 }
+add_filter('wp_mail_from_name', 'dw_fromname');
 function dw_fromname($email){
    	$wpfrom = get_option('blogname');
     return $wpfrom;
 }
-add_filter('wp_mail_from', 'dw_fromemail');
-add_filter('wp_mail_from_name', 'dw_fromname');
 
+add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ;
 function dw_oembed_filter($html, $url, $attr, $post_ID) {
     $return = '<div class="video-container">'.$html.'</div>';
 	$return = str_replace('frameborder="0" allowfullscreen', 'style="border:none"', $return);
     return $return;
 }
-add_filter( 'embed_oembed_html', 'dw_oembed_filter', 10, 4 ) ;
 
+
+add_filter( 'embed_oembed_html', 'dw_embed_oembed_html' );
 function dw_embed_oembed_html( $html ) {
     return preg_replace( '@src="https?:@', 'src="', $html );
 }
-add_filter( 'embed_oembed_html', 'dw_embed_oembed_html' );
+
+
+add_filter("gform_field_content", "bootstrap_gravityforms", 10, 5);
+function bootstrap_gravityforms($content, $field, $value, $lead_id, $form_id){
+if($field["type"] != 'hidden' && $field["type"] != 'list' && $field["type"] != 'multiselect' && $field["type"] != 'checkbox' && $field["type"] != 'fileupload' && $field["type"] != 'date' && $field["type"] != 'html' && $field["type"] != 'address') {
+		$content = str_replace('class=\'medium', 'class=\'form-control medium', $content);
+	}
+	if($field["type"] == 'name' || $field["type"] == 'address') {
+		$content = str_replace('<input ', '<input class=\'form-control\' ', $content);
+	}
+	if($field["type"] == 'textarea') {
+		$content = str_replace('class=\'textarea', 'class=\'form-control textarea', $content);
+	}
+	if($field["type"] == 'checkbox') {
+		$content = str_replace('li class=\'', 'li class=\'checkbox ', $content);
+		$content = str_replace('<input ', '<input style=\'margin-left:1px;\' ', $content);
+	}
+	if($field["type"] == 'radio') {
+		$content = str_replace('li class=\'', 'li class=\'radio ', $content);
+		$content = str_replace('<input ', '<input style=\'margin-left:1px;\' ', $content);
+	}
+	return $content;
+}
+
+add_filter("gform_init_scripts_footer", "init_gscripts");
+function init_gscripts() {
+	return true;
+}
+
+add_action( 'wp_print_scripts', 'dw_deregister_javascript', 100 );
+function dw_deregister_javascript() {
+	wp_deregister_script( 'gform_conditional_logic' );
+	//wp_deregister_script( 'gform_json' );
+	wp_deregister_script( 'gforms_stripe_frontend' );
+	//wp_deregister_script( 'gform_gravityforms' );
+}
 
 ?>

File diff suppressed because it is too large
+ 2069 - 0
js/form.js


+ 160 - 0
js/json.js

@@ -0,0 +1,160 @@
+/*
+ * jQuery JSON Plugin
+ * version: 1.0 (2008-04-17)
+ *
+ * This document is licensed as free software under the terms of the
+ * MIT License: http://www.opensource.org/licenses/mit-license.php
+ *
+ * Brantley Harris technically wrote this plugin, but it is based somewhat
+ * on the JSON.org website's http://www.json.org/json2.js, which proclaims:
+ * "NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.", a sentiment that
+ * I uphold.  I really just cleaned it up.
+ *
+ * It is also based heavily on MochiKit's serializeJSON, which is
+ * copywrited 2005 by Bob Ippolito.
+ */
+
+(function($) {
+    function toIntegersAtLease(n)
+    // Format integers to have at least two digits.
+    {
+        return n < 10 ? '0' + n : n;
+    }
+
+    Date.prototype.toJSON = function(date)
+    // Yes, it polutes the Date namespace, but we'll allow it here, as
+    // it's damned usefull.
+    {
+        return this.getUTCFullYear()   + '-' +
+             toIntegersAtLease(this.getUTCMonth()) + '-' +
+             toIntegersAtLease(this.getUTCDate());
+    };
+
+    var escapeable = /["\\\x00-\x1f\x7f-\x9f]/g;
+    var meta = {    // table of character substitutions
+            '\b': '\\b',
+            '\t': '\\t',
+            '\n': '\\n',
+            '\f': '\\f',
+            '\r': '\\r',
+            '"' : '\\"',
+            '\\': '\\\\'
+        };
+
+    $.quoteString = function(string)
+    // Places quotes around a string, inteligently.
+    // If the string contains no control characters, no quote characters, and no
+    // backslash characters, then we can safely slap some quotes around it.
+    // Otherwise we must also replace the offending characters with safe escape
+    // sequences.
+    {
+        //if (escapeable.test(string))
+        //{
+            return '"' + string.replace(escapeable, function (a)
+            {
+                var c = meta[a];
+                if (typeof c === 'string') {
+                    return c;
+                }
+                c = a.charCodeAt();
+                return '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
+            }) + '"';
+        //}
+        //else{
+        //    string = string.replace('\n','\\n');
+        //}
+        return '"' + string + '"';
+    };
+
+    $.toJSON = function(o, compact)
+    {
+        var type = typeof(o);
+
+        if (type == "undefined")
+            return "undefined";
+        else if (type == "number" || type == "boolean")
+            return o + "";
+        else if (o === null)
+            return "null";
+
+        // Is it a string?
+        if (type == "string")
+        {
+            var str = $.quoteString(o);
+            return str;
+        }
+
+        // Does it have a .toJSON function?
+        if (type == "object" && typeof o.toJSON == "function")
+            return o.toJSON(compact);
+
+        // Is it an array?
+        if (type != "function" && typeof(o.length) == "number")
+        {
+            var ret = [];
+            for (var i = 0; i < o.length; i++) {
+                ret.push( $.toJSON(o[i], compact) );
+            }
+            if (compact)
+                return "[" + ret.join(",") + "]";
+            else
+                return "[" + ret.join(", ") + "]";
+        }
+
+        // If it's a function, we have to warn somebody!
+        if (type == "function") {
+            throw new TypeError("Unable to convert object of type 'function' to json.");
+        }
+
+        // It's probably an object, then.
+        var ret = [];
+        for (var k in o) {
+            var name;
+            type = typeof(k);
+
+            if (type == "number")
+                name = '"' + k + '"';
+            else if (type == "string")
+                name = $.quoteString(k);
+            else
+                continue;  //skip non-string or number keys
+
+            var val = $.toJSON(o[k], compact);
+            if (typeof(val) != "string") {
+                // skip non-serializable values
+                continue;
+            }
+
+            if (compact)
+                ret.push(name + ":" + val);
+            else
+                ret.push(name + ": " + val);
+        }
+        return "{" + ret.join(", ") + "}";
+    };
+
+    $.compactJSON = function(o)
+    {
+        return $.toJSON(o, true);
+    };
+
+    $.evalJSON = function(src)
+    // Evals JSON that we know to be safe.
+    {
+        return eval("(" + src + ")");
+    };
+
+    $.secureEvalJSON = function(src)
+    // Evals JSON in a way that is *more* secure.
+    {
+        var filtered = src;
+        filtered = filtered.replace(/\\["\\\/bfnrtu]/g, '@');
+        filtered = filtered.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']');
+        filtered = filtered.replace(/(?:^|:|,)(?:\s*\[)+/g, '');
+
+        if (/^[\],:{}\s]*$/.test(filtered))
+            return eval("(" + src + ")");
+        else
+            throw new SyntaxError("Error parsing JSON, source is not valid.");
+    };
+})(jQuery);

+ 48 - 0
page-contact.php

@@ -0,0 +1,48 @@
+<?php get_header(); ?>
+
+	<div class="container" role="main">
+		<div id="content" class="single" >
+			<div class="row">
+				<div class="col-sm-4">			
+					<h2 class="entry-title">Contact</h2>
+					<h5 class="lead">Questions? Say Hello.</h5>
+					<p>Please provide as much information as possible so that I can save us both some time with an adequate response.</p>
+
+					
+					<h5 class="contact"><span class="fa fa-home fa-fw"></span> Address</h5>
+					<p>104 Wilton Street<br/>Greenwood, SC 29649</p>
+					<h5 class="contact"><span class="fa fa-phone fa-fw"></span> Phone</h5>
+					<p>803-712-3283</p>
+					<h5 class="contact"><span class="fa fa-envelope-o fa-fw"></span> Email</h5>
+					<p>
+						<script type="text/javascript"> 
+							//<![CDATA[
+							function hiveware_enkoder(){var i,j,x,y,x=
+							"x=\"3.r87dx:7=\\\"57|A;7&;:7<7:7h6=767:7:7878767::<7:7:7:75777;7;7879767::" +
+							"=787:7:78797:7::5797;7;7:787:76:=797:7;787;7:7;75767;7:7;7=7:7;7=787:::797" +
+							"97:76787<7:767<767:77:5777:::787576:679747:7:777<7::;7:767:::787977::777:7" +
+							"6:7::787:79:57777:67976767::678767:7=7577::767=777::47777:;7668767::f;:7=7" +
+							"7:h657;6:7;787f::7::57j;;766:7<::7=7=7h7:74787f:87=747g;:7<687i::7g:579:;7" +
+							"i::7;;:78:=7<7:7f:87=6:7f757h7;766;7=;:7f;=7=6::f797h;:79:87i::79;<77::77:" +
+							"575;::4:87966:<697;6:79677;6::f;:7<6::i;877;7:9::76;;77;778;;76697<::7=667" +
+							"g7::6657=6:7=797f;:7h;77=&;7?}87A+7:+?87js;7v,67mA:74?97m@7:|257pi:7rk87xl" +
+							":7?m57/A;76-:7!}:7/A=7yr:7iw87ge:7ti57,+;7)+;7/|:72w=7yf::wx97v,:7m0876-:7" +
+							"-?<7#}:7\\\";57y=::''87;x6:=u97ne:7sc77ap::e(:7x)::;f87or9:(i77=067;i67<x;" +
+							"7.l87en:7gt=7h;;7i+87+)::{j77=x:7.c97ha7:rC87od9:eA77t(67i)67-4:7;i77f(::j" +
+							"<:732::)j97+=;79487;y:7+=57St:7ri77ng;7.f87ro9:mC77ha67rC67od7:e(97j):7}y\""+
+							";j=eval(x.charAt(0));x=x.substr(1);y='';for(i=0;i<x.length;i+=4){y+=x.subs" +
+							"tr(i,2);}for(i=2;i<x.length;i+=4){y+=x.substr(i,2);}y=y.substr(j);";
+							while(x=eval(x));}hiveware_enkoder();
+							//]]>
+						</script>
+					</p>
+				
+				</div>
+				<div class="col-sm-8">
+					<?php gravity_form(1, false, false, false, '', false); ?>
+				</div>
+			</div>
+		</div>
+	</div>
+	
+<?php get_footer(); ?>

File diff suppressed because it is too large
+ 101 - 11
style.css