Current state
|
After Width: | Height: | Size: 137 B |
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 799 B |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 793 B |
|
After Width: | Height: | Size: 845 B |
|
After Width: | Height: | Size: 234 B |
228
public/assets/plugins/jquery-validation/demo/marketo/index.html
Normal file
@@ -0,0 +1,228 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Subscription Signup | Marketo</title>
|
||||
|
||||
<script src="../../lib/jquery.js"></script>
|
||||
<script src="../../lib/jquery.mockjax.js"></script>
|
||||
<script src="../../dist/jquery.validate.js"></script>
|
||||
|
||||
<script src="jquery.maskedinput.js"></script>
|
||||
<script src="mktSignup.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="stylesheet.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!-- start page wrapper --><div id="letterbox">
|
||||
|
||||
<!-- start header container -->
|
||||
<div id="header-background">
|
||||
<div class="nav-global-container">
|
||||
<div class="login"><a href="#"><span></span>Customer Login</a></div>
|
||||
<div class="logo"><a href="#"><img src="images/logo_marketo.gif" width="168" height="73" alt="Marketo" /></a></div>
|
||||
<div class="nav-global">
|
||||
<ul>
|
||||
<li><a href="#" class="nav-g01"><span></span>Home</a></li>
|
||||
<li><a href="#" class="nav-g02"><span></span>Products</a></li>
|
||||
<li><a href="#" class="nav-g04"><span></span>B2B Marketing Resources</a></li>
|
||||
<li><a href="#" class="nav-g05"><span></span>About Marketo</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header container -->
|
||||
<div class="line-grey-tier"></div>
|
||||
|
||||
<!-- start page container 2 div-->
|
||||
<div id="page-container" class="resize"><div id="page-content-inner" class="resize">
|
||||
|
||||
<!-- start col-main -->
|
||||
|
||||
<div id="col-main" class="resize" style="">
|
||||
|
||||
|
||||
|
||||
<!-- start main content -->
|
||||
<div class="main-content resize">
|
||||
|
||||
<div class="action-container" style="display:none;"></div>
|
||||
|
||||
|
||||
<h1>Step 1 of 2 </h1>
|
||||
<p>
|
||||
</p>
|
||||
<br clear="all" />
|
||||
<div>
|
||||
<form id="profileForm" type="actionForm" action="step2.htm" method="get" >
|
||||
|
||||
|
||||
<div class="error" style="display:none;">
|
||||
<img src="images/warning.gif" alt="Warning!" width="24" height="24" style="float:left; margin: -5px 10px 0px 0px; " />
|
||||
|
||||
<span></span>.<br clear="all"/>
|
||||
</div>
|
||||
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="label"><label for="co_name">Company Name:</label></td>
|
||||
<td class="field">
|
||||
<input id="co_name" class="required" maxlength="40" name="co_name" size="20" type="text" tabindex="1" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="co_url">Company URL:</label></td>
|
||||
<td class="field">
|
||||
<input id="co_url" class="required defaultInvalid url" maxlength="40" name="co_url" style="width:163px" type="text" tabindex="2" value="http://" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td/><td/>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="first_name">First Name:</label></td>
|
||||
<td class="field">
|
||||
<input id="first_name" class="required" maxlength="40" name="first_name" size="20" type="text" tabindex="3" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="last_name">Last Name:</label></td>
|
||||
<td class="field">
|
||||
<input id="last_name" class="required" maxlength="40" name="last_name" size="20" type="text" tabindex="4" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="address1">Company Address:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="required" name="address1" size="20" type="text" tabindex="5" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" name="address2" size="20" type="text" tabindex="6" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="city">City:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="required" name="city" size="20" type="text" tabindex="7" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="state">State:</label></td>
|
||||
<td class="field">
|
||||
<select id="state" class="required" name="state" style="margin-left: 4px;" tabindex="8">
|
||||
<option value="">Choose State:</option>
|
||||
<option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="zip">Zip:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="10" name="zip" style="width: 100px" type="text" class="required zipcode" tabindex="9" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="phone">Phone:</label></td>
|
||||
<td class="field">
|
||||
<input id="phone" maxlength="14" name="phone" type="text" class="required phone" tabindex="10" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<h2 style="border-bottom: 1px solid #CCCCCC;">Login Information</h2>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="email">Email:</label></td>
|
||||
<td class="field">
|
||||
<input id="email" class="required email" remote="emails.action" maxlength="40" name="email" size="20" type="text" tabindex="11" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="password1">Password:</label></td>
|
||||
<td class="field">
|
||||
<input id="password1" class="required password" maxlength="40" name="password1" size="20" type="password" tabindex="12" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="password2">Retype Password:</label></td>
|
||||
<td class="field">
|
||||
<input id="password2" class="required" equalTo="#password1" maxlength="40" name="password2" size="20" type="password" tabindex="13" value="" />
|
||||
<div class="formError"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div class="buttonSubmit">
|
||||
<span></span>
|
||||
<input class="formButton" type="submit" value="Next" style="width: 140px" tabindex="14" />
|
||||
</div>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table><br /><br />
|
||||
</form>
|
||||
<br clear="all"/>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div> <!-- end main content -->
|
||||
<br />
|
||||
</div> <!-- end col-main -->
|
||||
|
||||
<!-- start left col -->
|
||||
<div id="col-left" class="nav-left-back empty resize" style="position: absolute; min-height: 450px;">
|
||||
<div class="col-left-header-tab" style="position: absolute;">Signup</div>
|
||||
<div class="nav-left">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="left-nav-callout png" style="top: 15px; margin-bottom: 100px;">
|
||||
<img src="images/left-nav-callout-long.png" class="png" alt="" />
|
||||
<h6>Sign Up Process</h6>
|
||||
<a style="background-image: url(images/step1-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Sign up with a valid credit card.</a>
|
||||
<a style="background-image: url(images/step2-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Connect to your Google AdWords account. You will need your AdWords Customer ID.</a>
|
||||
<a style="background-image: url(images/step3-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Start your 30 day trial. No payments until trial ends.</a>
|
||||
</div>
|
||||
|
||||
<div class="footerAddress">
|
||||
<b>Marketo Inc.</b><br />
|
||||
1710 S. Amphlett Blvd.<br />
|
||||
San Mateo, CA 94402 USA<br />
|
||||
</div>
|
||||
<br clear="all"/>
|
||||
</div> <!-- end left col -->
|
||||
|
||||
</div> </div> <!-- end page container 2 divs-->
|
||||
|
||||
<div id="footer-container" align="center">
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li><a href="..">Home</a></li>
|
||||
<li class="line-off"><a href="step2.htm">Second step</a></li>
|
||||
</ul>
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
<!-- end page wrapper -->
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,338 @@
|
||||
/*
|
||||
Masked Input plugin for jQuery
|
||||
Copyright (c) 2007-2013 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.3.1
|
||||
*/
|
||||
(function($) {
|
||||
function getPasteEvent() {
|
||||
var el = document.createElement('input'),
|
||||
name = 'onpaste';
|
||||
el.setAttribute(name, '');
|
||||
return (typeof el[name] === 'function')?'paste':'input';
|
||||
}
|
||||
|
||||
var pasteEventName = getPasteEvent() + ".mask",
|
||||
ua = navigator.userAgent,
|
||||
iPhone = /iphone/i.test(ua),
|
||||
android=/android/i.test(ua),
|
||||
caretTimeoutId;
|
||||
|
||||
$.mask = {
|
||||
//Predefined character definitions
|
||||
definitions: {
|
||||
'9': "[0-9]",
|
||||
'a': "[A-Za-z]",
|
||||
'*': "[A-Za-z0-9]"
|
||||
},
|
||||
dataName: "rawMaskFn",
|
||||
placeholder: '_',
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
//Helper Function for Caret positioning
|
||||
caret: function(begin, end) {
|
||||
var range;
|
||||
|
||||
if (this.length === 0 || this.is(":hidden")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof begin == 'number') {
|
||||
end = (typeof end === 'number') ? end : begin;
|
||||
return this.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
this.setSelectionRange(begin, end);
|
||||
} else if (this.createTextRange) {
|
||||
range = this.createTextRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd('character', end);
|
||||
range.moveStart('character', begin);
|
||||
range.select();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this[0].setSelectionRange) {
|
||||
begin = this[0].selectionStart;
|
||||
end = this[0].selectionEnd;
|
||||
} else if (document.selection && document.selection.createRange) {
|
||||
range = document.selection.createRange();
|
||||
begin = 0 - range.duplicate().moveStart('character', -100000);
|
||||
end = begin + range.text.length;
|
||||
}
|
||||
return { begin: begin, end: end };
|
||||
}
|
||||
},
|
||||
unmask: function() {
|
||||
return this.trigger("unmask");
|
||||
},
|
||||
mask: function(mask, settings) {
|
||||
var input,
|
||||
defs,
|
||||
tests,
|
||||
partialPosition,
|
||||
firstNonMaskPos,
|
||||
len;
|
||||
|
||||
if (!mask && this.length > 0) {
|
||||
input = $(this[0]);
|
||||
return input.data($.mask.dataName)();
|
||||
}
|
||||
settings = $.extend({
|
||||
placeholder: $.mask.placeholder, // Load default placeholder
|
||||
completed: null
|
||||
}, settings);
|
||||
|
||||
|
||||
defs = $.mask.definitions;
|
||||
tests = [];
|
||||
partialPosition = len = mask.length;
|
||||
firstNonMaskPos = null;
|
||||
|
||||
$.each(mask.split(""), function(i, c) {
|
||||
if (c == '?') {
|
||||
len--;
|
||||
partialPosition = i;
|
||||
} else if (defs[c]) {
|
||||
tests.push(new RegExp(defs[c]));
|
||||
if (firstNonMaskPos === null) {
|
||||
firstNonMaskPos = tests.length - 1;
|
||||
}
|
||||
} else {
|
||||
tests.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
return this.trigger("unmask").each(function() {
|
||||
var input = $(this),
|
||||
buffer = $.map(
|
||||
mask.split(""),
|
||||
function(c, i) {
|
||||
if (c != '?') {
|
||||
return defs[c] ? settings.placeholder : c;
|
||||
}
|
||||
}),
|
||||
focusText = input.val();
|
||||
|
||||
function seekNext(pos) {
|
||||
while (++pos < len && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function seekPrev(pos) {
|
||||
while (--pos >= 0 && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function shiftL(begin,end) {
|
||||
var i,
|
||||
j;
|
||||
|
||||
if (begin<0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = begin, j = seekNext(end); i < len; i++) {
|
||||
if (tests[i]) {
|
||||
if (j < len && tests[i].test(buffer[j])) {
|
||||
buffer[i] = buffer[j];
|
||||
buffer[j] = settings.placeholder;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
j = seekNext(j);
|
||||
}
|
||||
}
|
||||
writeBuffer();
|
||||
input.caret(Math.max(firstNonMaskPos, begin));
|
||||
}
|
||||
|
||||
function shiftR(pos) {
|
||||
var i,
|
||||
c,
|
||||
j,
|
||||
t;
|
||||
|
||||
for (i = pos, c = settings.placeholder; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
j = seekNext(i);
|
||||
t = buffer[i];
|
||||
buffer[i] = c;
|
||||
if (j < len && tests[j].test(t)) {
|
||||
c = t;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function keydownEvent(e) {
|
||||
var k = e.which,
|
||||
pos,
|
||||
begin,
|
||||
end;
|
||||
|
||||
//backspace, delete, and escape get special treatment
|
||||
if (k === 8 || k === 46 || (iPhone && k === 127)) {
|
||||
pos = input.caret();
|
||||
begin = pos.begin;
|
||||
end = pos.end;
|
||||
|
||||
if (end - begin === 0) {
|
||||
begin=k!==46?seekPrev(begin):(end=seekNext(begin-1));
|
||||
end=k===46?seekNext(end):end;
|
||||
}
|
||||
clearBuffer(begin, end);
|
||||
shiftL(begin, end - 1);
|
||||
|
||||
e.preventDefault();
|
||||
} else if (k == 27) {//escape
|
||||
input.val(focusText);
|
||||
input.caret(0, checkVal());
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function keypressEvent(e) {
|
||||
var k = e.which,
|
||||
pos = input.caret(),
|
||||
p,
|
||||
c,
|
||||
next;
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore
|
||||
return;
|
||||
} else if (k) {
|
||||
if (pos.end - pos.begin !== 0){
|
||||
clearBuffer(pos.begin, pos.end);
|
||||
shiftL(pos.begin, pos.end-1);
|
||||
}
|
||||
|
||||
p = seekNext(pos.begin - 1);
|
||||
if (p < len) {
|
||||
c = String.fromCharCode(k);
|
||||
if (tests[p].test(c)) {
|
||||
shiftR(p);
|
||||
|
||||
buffer[p] = c;
|
||||
writeBuffer();
|
||||
next = seekNext(p);
|
||||
|
||||
if(android){
|
||||
setTimeout($.proxy($.fn.caret,input,next),0);
|
||||
}else{
|
||||
input.caret(next);
|
||||
}
|
||||
|
||||
if (settings.completed && next >= len) {
|
||||
settings.completed.call(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function clearBuffer(start, end) {
|
||||
var i;
|
||||
for (i = start; i < end && i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = settings.placeholder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeBuffer() { input.val(buffer.join('')); }
|
||||
|
||||
function checkVal(allow) {
|
||||
//try to place characters where they belong
|
||||
var test = input.val(),
|
||||
lastMatch = -1,
|
||||
i,
|
||||
c;
|
||||
|
||||
for (i = 0, pos = 0; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = settings.placeholder;
|
||||
while (pos++ < test.length) {
|
||||
c = test.charAt(pos - 1);
|
||||
if (tests[i].test(c)) {
|
||||
buffer[i] = c;
|
||||
lastMatch = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos > test.length) {
|
||||
break;
|
||||
}
|
||||
} else if (buffer[i] === test.charAt(pos) && i !== partialPosition) {
|
||||
pos++;
|
||||
lastMatch = i;
|
||||
}
|
||||
}
|
||||
if (allow) {
|
||||
writeBuffer();
|
||||
} else if (lastMatch + 1 < partialPosition) {
|
||||
input.val("");
|
||||
clearBuffer(0, len);
|
||||
} else {
|
||||
writeBuffer();
|
||||
input.val(input.val().substring(0, lastMatch + 1));
|
||||
}
|
||||
return (partialPosition ? i : firstNonMaskPos);
|
||||
}
|
||||
|
||||
input.data($.mask.dataName,function(){
|
||||
return $.map(buffer, function(c, i) {
|
||||
return tests[i]&&c!=settings.placeholder ? c : null;
|
||||
}).join('');
|
||||
});
|
||||
|
||||
if (!input.attr("readonly"))
|
||||
input
|
||||
.one("unmask", function() {
|
||||
input
|
||||
.unbind(".mask")
|
||||
.removeData($.mask.dataName);
|
||||
})
|
||||
.bind("focus.mask", function() {
|
||||
clearTimeout(caretTimeoutId);
|
||||
var pos,
|
||||
moveCaret;
|
||||
|
||||
focusText = input.val();
|
||||
pos = checkVal();
|
||||
|
||||
caretTimeoutId = setTimeout(function(){
|
||||
writeBuffer();
|
||||
if (pos == mask.length) {
|
||||
input.caret(0, pos);
|
||||
} else {
|
||||
input.caret(pos);
|
||||
}
|
||||
}, 10);
|
||||
})
|
||||
.bind("blur.mask", function() {
|
||||
checkVal();
|
||||
if (input.val() != focusText)
|
||||
input.change();
|
||||
})
|
||||
.bind("keydown.mask", keydownEvent)
|
||||
.bind("keypress.mask", keypressEvent)
|
||||
.bind(pasteEventName, function() {
|
||||
setTimeout(function() {
|
||||
var pos=checkVal(true);
|
||||
input.caret(pos);
|
||||
if (settings.completed && pos == input.val().length)
|
||||
settings.completed.call(input);
|
||||
}, 0);
|
||||
});
|
||||
checkVal(); //Perform initial check for existing values
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
})(jQuery);
|
||||
133
public/assets/plugins/jquery-validation/demo/marketo/mktSignup.js
vendored
Normal file
@@ -0,0 +1,133 @@
|
||||
$(document).ready(function(){
|
||||
$.mockjax({
|
||||
url: "emails.action",
|
||||
response: function(settings) {
|
||||
var email = settings.data.email,
|
||||
emails = ["glen@marketo.com", "george@bush.gov", "me@god.com", "aboutface@cooper.com", "steam@valve.com", "bill@gates.com"];
|
||||
this.responseText = "true";
|
||||
if ( $.inArray( email, emails ) !== -1 ) {
|
||||
this.responseText = "false";
|
||||
}
|
||||
},
|
||||
responseTime: 500
|
||||
});
|
||||
|
||||
jQuery.validator.addMethod("password", function( value, element ) {
|
||||
var result = this.optional(element) || value.length >= 6 && /\d/.test(value) && /[a-z]/i.test(value);
|
||||
if (!result) {
|
||||
element.value = "";
|
||||
var validator = this;
|
||||
setTimeout(function() {
|
||||
validator.blockFocusCleanup = true;
|
||||
element.focus();
|
||||
validator.blockFocusCleanup = false;
|
||||
}, 1);
|
||||
}
|
||||
return result;
|
||||
}, "Your password must be at least 6 characters long and contain at least one number and one character.");
|
||||
|
||||
// a custom method making the default value for companyurl ("http://") invalid, without displaying the "invalid url" message
|
||||
jQuery.validator.addMethod("defaultInvalid", function(value, element) {
|
||||
return value != element.defaultValue;
|
||||
}, "");
|
||||
|
||||
jQuery.validator.addMethod("billingRequired", function(value, element) {
|
||||
if ($("#bill_to_co").is(":checked"))
|
||||
return $(element).parents(".subTable").length;
|
||||
return !this.optional(element);
|
||||
}, "");
|
||||
|
||||
jQuery.validator.messages.required = "";
|
||||
$("form").validate({
|
||||
invalidHandler: function(e, validator) {
|
||||
var errors = validator.numberOfInvalids();
|
||||
if (errors) {
|
||||
var message = errors == 1
|
||||
? 'You missed 1 field. It has been highlighted below'
|
||||
: 'You missed ' + errors + ' fields. They have been highlighted below';
|
||||
$("div.error span").html(message);
|
||||
$("div.error").show();
|
||||
} else {
|
||||
$("div.error").hide();
|
||||
}
|
||||
},
|
||||
onkeyup: false,
|
||||
submitHandler: function() {
|
||||
$("div.error").hide();
|
||||
alert("submit! use link below to go to the other step");
|
||||
},
|
||||
messages: {
|
||||
password2: {
|
||||
required: " ",
|
||||
equalTo: "Please enter the same password as above"
|
||||
},
|
||||
email: {
|
||||
required: " ",
|
||||
email: "Please enter a valid email address, example: you@yourdomain.com",
|
||||
remote: jQuery.validator.format("{0} is already taken, please enter a different address.")
|
||||
}
|
||||
},
|
||||
debug:true
|
||||
});
|
||||
|
||||
$(".resize").vjustify();
|
||||
$("div.buttonSubmit").hoverClass("buttonSubmitHover");
|
||||
|
||||
$("input.phone").mask("(999) 999-9999");
|
||||
$("input.zipcode").mask("99999");
|
||||
var creditcard = $("#creditcard").mask("9999 9999 9999 9999");
|
||||
|
||||
$("#cc_type").change(
|
||||
function() {
|
||||
switch ($(this).val()){
|
||||
case 'amex':
|
||||
creditcard.unmask().mask("9999 999999 99999");
|
||||
break;
|
||||
default:
|
||||
creditcard.unmask().mask("9999 9999 9999 9999");
|
||||
break;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// toggle optional billing address
|
||||
var subTableDiv = $("div.subTableDiv");
|
||||
var toggleCheck = $("input.toggleCheck");
|
||||
toggleCheck.is(":checked")
|
||||
? subTableDiv.hide()
|
||||
: subTableDiv.show();
|
||||
$("input.toggleCheck").click(function() {
|
||||
if (this.checked == true) {
|
||||
subTableDiv.slideUp("medium");
|
||||
$("form").valid();
|
||||
} else {
|
||||
subTableDiv.slideDown("medium");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
$.fn.vjustify = function() {
|
||||
var maxHeight=0;
|
||||
$(".resize").css("height","auto");
|
||||
this.each(function(){
|
||||
if (this.offsetHeight > maxHeight) {
|
||||
maxHeight = this.offsetHeight;
|
||||
}
|
||||
});
|
||||
this.each(function(){
|
||||
$(this).height(maxHeight);
|
||||
if (this.offsetHeight > maxHeight) {
|
||||
$(this).height((maxHeight-(this.offsetHeight-maxHeight)));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.hoverClass = function(classname) {
|
||||
return this.hover(function() {
|
||||
$(this).addClass(classname);
|
||||
}, function() {
|
||||
$(this).removeClass(classname);
|
||||
});
|
||||
};
|
||||
263
public/assets/plugins/jquery-validation/demo/marketo/step2.htm
Normal file
@@ -0,0 +1,263 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Subscription Signup | Marketo</title>
|
||||
|
||||
<script src="../../lib/jquery.js"></script>
|
||||
<script src="../../lib/jquery.mockjax.js"></script>
|
||||
<script src="../../jquery.validate.js"></script>
|
||||
|
||||
<script src="jquery.maskedinput.js"></script>
|
||||
<script src="mktSignup.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="stylesheet.css" />
|
||||
</head>
|
||||
<body>
|
||||
<!-- start page wrapper --><div id="letterbox">
|
||||
|
||||
<!-- start header container -->
|
||||
<div id="header-background">
|
||||
<div class="nav-global-container">
|
||||
<div class="login"><a href="#"><span></span>Customer Login</a></div>
|
||||
<div class="logo"><a href="#"><img src="images/logo_marketo.gif" width="168" height="73" alt="Marketo" /></a></div>
|
||||
<div class="nav-global">
|
||||
<ul>
|
||||
<li><a href="#" class="nav-g01"><span></span>Home</a></li>
|
||||
<li><a href="#" class="nav-g02"><span></span>Products</a></li>
|
||||
<li><a href="#" class="nav-g04"><span></span>B2B Marketing Resources</a></li>
|
||||
<li><a href="#" class="nav-g05"><span></span>About Marketo</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header container -->
|
||||
<div class="line-grey-tier"></div>
|
||||
|
||||
<!-- start page container 2 div-->
|
||||
<div id="page-container" class="resize"><div id="page-content-inner" class="resize">
|
||||
|
||||
<!-- start col-main -->
|
||||
|
||||
<div id="col-main" class="resize" style="">
|
||||
|
||||
|
||||
|
||||
<!-- start main content -->
|
||||
<div class="main-content resize">
|
||||
|
||||
<div class="action-container" style="display:none;"></div>
|
||||
|
||||
|
||||
<h1>Step 2 of 2</h1>
|
||||
<h2>Billing Information</h2>
|
||||
<p>
|
||||
</p>
|
||||
<br clear="all" />
|
||||
<div>
|
||||
<form id="billingForm" action="" method="get" >
|
||||
|
||||
<div class="error" style="display:none;">
|
||||
<img src="images/warning.gif" alt="Warning!" width="24" height="24" style="float:left; margin: -5px 10px 0px 0px; " />
|
||||
|
||||
<span></span>.<br clear="all" />
|
||||
</div>
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="label" style="vertical-align: top; padding-top: 8px;">Billing Address:</td>
|
||||
<td class="field" style="font-weight: normal">
|
||||
<div class="billingAddressControl">
|
||||
|
||||
<input type="checkbox" id="bill_to_co" name="bill_to_co" class="toggleCheck" checked="checked" style="width: auto;" tabindex="1" />
|
||||
<label for="bill_to_co" style="cursor:pointer">Same as Company Address</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="subTable">
|
||||
<td colspan="2">
|
||||
<div style="background-color: #EEEEEE; border: 1px solid #CCCCCC; padding: 10px;" class="subTableDiv">
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td class="label"><label for="bill_first_name">First Name:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="billingRequired" name="bill_first_name" size="20" type="text" tabindex="2" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="bill_last_name">Last Name:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="billingRequired" name="bill_last_name" size="20" type="text" tabindex="3" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="bill_email">Email:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="billingRequired email" remote="emails.action" name="email" size="20" type="text" tabindex="4" value="" />
|
||||
<div class="formError"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="bill_address1">Address:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="billingRequired" name="bill_address1" size="20" type="text" tabindex="5" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" name="bill_address2" size="20" type="text" tabindex="6" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="bill_city">City:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" class="billingRequired" name="bill_city" size="20" type="text" tabindex="7" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="bill_state">State:</label></td>
|
||||
<td class="field">
|
||||
<select id="bill_state" class="billingRequired" name="bill_state" style="margin-left: 4px;" tabindex="8">
|
||||
<option value="">Choose State</option>
|
||||
<option value="AL">Alabama</option><option value="AK">Alaska</option><option value="AZ">Arizona</option><option value="AR">Arkansas</option><option value="CA">California</option><option value="CO">Colorado</option><option value="CT">Connecticut</option><option value="DE">Delaware</option><option value="FL">Florida</option><option value="GA">Georgia</option><option value="HI">Hawaii</option><option value="ID">Idaho</option><option value="IL">Illinois</option><option value="IN">Indiana</option><option value="IA">Iowa</option><option value="KS">Kansas</option><option value="KY">Kentucky</option><option value="LA">Louisiana</option><option value="ME">Maine</option><option value="MD">Maryland</option><option value="MA">Massachusetts</option><option value="MI">Michigan</option><option value="MN">Minnesota</option><option value="MS">Mississippi</option><option value="MO">Missouri</option><option value="MT">Montana</option><option value="NE">Nebraska</option><option value="NV">Nevada</option><option value="NH">New Hampshire</option><option value="NJ">New Jersey</option><option value="NM">New Mexico</option><option value="NY">New York</option><option value="NC">North Carolina</option><option value="ND">North Dakota</option><option value="OH">Ohio</option><option value="OK">Oklahoma</option><option value="OR">Oregon</option><option value="PA">Pennsylvania</option><option value="RI">Rhode Island</option><option value="SC">South Carolina</option><option value="SD">South Dakota</option><option value="TN">Tennessee</option><option value="TX">Texas</option><option value="UT">Utah</option><option value="VT">Vermont</option><option value="VA">Virginia</option><option value="WA">Washington</option><option value="WV">West Virginia</option><option value="WI">Wisconsin</option><option value="WY">Wyoming</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="bill_zip">Zip:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="10" class="billingRequired zipcode" name="bill_zip" style="width: 100px" type="text" class="zipcode" tabindex="9" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="label"><label for="bill_phone">Phone:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="14" class="billingRequired phone" name="bill_phone" style="width: 100px" type="text" class="phone" tabindex="10" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Credit Card Type:</td>
|
||||
<td class="field">
|
||||
<select id="cc_type" class="required" name="cc_type" class="creditCardType" tabindex="11">
|
||||
<option value="">Choose Credit Card</option>
|
||||
<option value="amex">American Express</option>
|
||||
<option value="discover">Discover</option>
|
||||
<option value="mastercard">MasterCard</option>
|
||||
<option value="visa">Visa</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label">Expiration:</td>
|
||||
<td class="field">
|
||||
<select id="cc_exp_month" name="cc_exp_month" title="ExpirationMonth" tabindex="12">
|
||||
<option value="01">01 - Jan</option>
|
||||
<option value="02">02 - Feb</option>
|
||||
<option value="03">03 - Mar</option>
|
||||
<option value="04">04 - Apr</option>
|
||||
<option value="05">05 - May</option>
|
||||
<option value="06">06 - Jun</option>
|
||||
<option value="07">07 - Jul</option>
|
||||
<option value="08">08 - Aug</option>
|
||||
<option value="09">09 - Sep</option>
|
||||
<option value="10">10 - Oct</option>
|
||||
<option value="11">11 - Nov</option>
|
||||
<option value="12">12 - Dec</option>
|
||||
</select>
|
||||
<select id="cc_exp_year" name="cc_exp_year" title="ExpirationYear" tabindex="13">
|
||||
<option value="2007">2007</option>
|
||||
<option value="2008" selected="selected">2008</option>
|
||||
<option value="2009">2009</option>
|
||||
<option value="2010">2010</option>
|
||||
<option value="2011">2011</option>
|
||||
<option value="2012">2012</option>
|
||||
<option value="2013">2013</option>
|
||||
<option value="2014">2014</option>
|
||||
<option value="2015">2015</option>
|
||||
<option value="2016">2016</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="credit_card">Credit Card Number:</label></td>
|
||||
<td class="field">
|
||||
<input maxlength="40" id="creditcard" class="required" name="credit_card" size="20" type="text" tabindex="14" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="label"><label for="cc_cvv">Security Code:</label></td>
|
||||
<td class="field">
|
||||
<input id="ccNumber" class="required" maxlength="4" name="cc_cvv" style="width: 30px;" type="text" style="vertical-align: top;" tabindex="16" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
<div class="buttonSubmit">
|
||||
<span></span>
|
||||
<input class="formButton" type="submit" value="Finish" style="width: 180px" />
|
||||
</div><br clear="all"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br clear="all" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div> <!-- end main content -->
|
||||
<br />
|
||||
</div> <!-- end col-main -->
|
||||
|
||||
<!-- start left col -->
|
||||
<div id="col-left" class="nav-left-back empty resize" style="position: absolute; min-height: 450px;">
|
||||
<div class="col-left-header-tab" style="position: absolute;">Signup</div>
|
||||
<div class="nav-left">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="left-nav-callout png" style="top: 15px; margin-bottom: 100px;">
|
||||
<img src="images/left-nav-callout-long.png" class="png" alt="" />
|
||||
<h6>Sign Up Process</h6>
|
||||
<a style="background-image: url(images/step1-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Sign up with a valid credit card.</a>
|
||||
<a style="background-image: url(images/step2-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Connect to your Google AdWords account. You will need your AdWords Customer ID.</a>
|
||||
|
||||
<a target="_blank" style="background-image: url(images/step3-24.gif); font-weight: normal; text-decoration: none; cursor: default;">Start your 30 day trial. No payments until trial ends.</a>
|
||||
</div>
|
||||
|
||||
<div class="footerAddress">
|
||||
<b>Marketo Inc.</b><br />
|
||||
1710 S. Amphlett Blvd.<br />
|
||||
San Mateo, CA 94402 USA<br />
|
||||
</div>
|
||||
<br clear="all"/>
|
||||
</div> <!-- end left col -->
|
||||
|
||||
</div> </div> <!-- end page container 2 divs-->
|
||||
|
||||
<div id="footer-container" align="center">
|
||||
<div class="footer">
|
||||
<ul>
|
||||
<li><a href="..">Home</a></li>
|
||||
<li class="line-off"><a href=".">Back to first step</a></li>
|
||||
</ul>
|
||||
</div></div>
|
||||
|
||||
|
||||
|
||||
<!-- end page wrapper -->
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||