This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var contactFormUtils = { | |
isValidEmail: function (email) { | |
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/; | |
return regex.test(email); | |
}, | |
clearErrors: function () { | |
$('#emailAlert').remove(); | |
$('#feedbackForm .help-block').hide(); | |
$('#feedbackForm .form-group').removeClass('has-error'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sets error header and json error message response. | |
* | |
* @param String $messsage error message of response | |
* @return void | |
*/ | |
function errorResponse ($messsage) { | |
header('HTTP/1.1 500 Internal Server Error'); | |
die(json_encode(array('message' => $messsage))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Rails/Angular pre commit hook. | |
# | |
# This should live in your rails config folder and a symbolic link should be created from .git/hooks/ to this file. You | |
# should also set the FRONT_END_PATH/BACK_END_PATH env. variable so the script knows where to pull in the front-end code from. | |
# | |
# This pre-commit hook does the following: | |
# 1. Runs rspec (and fails the commit if any tests fail) | |
# 2. Runs grunts default task on the Front-End project (which should minify and run karam tests). Fails the commit if any tests fail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//start a session -- needed for Securimage Captcha check | |
session_start(); | |
//add you e-mail address here | |
define("MY_EMAIL", "<<!! YOUR-EMAIL-ADDRESS-HERE !!>>"); | |
define("EMAIL_SUBJECT", "Feedback Form Results"); | |
//a map of fields to include in email, along with if they are required or not | |
//aparently in PHP, arrays (maps) can't be constants? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="A contact form using the Bootstrap 3 framework."> | |
<meta name="author" content=""> | |
<link rel="shortcut icon" href="../../assets/ico/favicon.png"> | |
<title>Bootstrap 3 Contact Form</title> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//start a session -- needed for Securimage Captcha check | |
session_start(); | |
//add you e-mail address here | |
define("MY_EMAIL", "your-email@foo.com"); | |
define("EMAIL_SUBJECT", "Feedback Form Results"); | |
//a map of fields to include in email, along with if they are required or not | |
//aparently in PHP, arrays (maps) can't be constants? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//start a session -- needed for Securimage Captcha check | |
session_start(); | |
//add you e-mail address here | |
define("MY_EMAIL", "jmb@jonbake.com"); | |
define("EMAIL_SUBJECT", "Feedback Form Results"); | |
//a map of fields to include in email, along with if they are required or not | |
//aparently in PHP, arrays (maps) can't be constants? |
NewerOlder