Skip to content

Commit 15b87df

Browse files
committed
Initial commit
0 parents  commit 15b87df

File tree

100 files changed

+24578
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+24578
-0
lines changed

.idea/eStartup.iml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 317 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Readme.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Thanks for downloading this theme!
2+
3+
Theme Name: eStartup
4+
Theme URL: https://bootstrapmade.com/estartup-bootstrap-landing-page-template/
5+
Author: BootstrapMade.com
6+
Author URL: https://bootstrapmade.com

contactform/Readme.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fully working PHP/AJAX contact form is available in the pro version.
2+
You can buy it from: https://bootstrapmade.com/estartup-bootstrap-landing-page-template/

contactform/contactform.js

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
jQuery(document).ready(function($) {
2+
"use strict";
3+
4+
//Contact
5+
$('form.contactForm').submit(function() {
6+
var f = $(this).find('.form-group'),
7+
ferror = false,
8+
emailExp = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i;
9+
10+
f.children('input').each(function() { // run all inputs
11+
12+
var i = $(this); // current input
13+
var rule = i.attr('data-rule');
14+
15+
if (rule !== undefined) {
16+
var ierror = false; // error flag for current input
17+
var pos = rule.indexOf(':', 0);
18+
if (pos >= 0) {
19+
var exp = rule.substr(pos + 1, rule.length);
20+
rule = rule.substr(0, pos);
21+
} else {
22+
rule = rule.substr(pos + 1, rule.length);
23+
}
24+
25+
switch (rule) {
26+
case 'required':
27+
if (i.val() === '') {
28+
ferror = ierror = true;
29+
}
30+
break;
31+
32+
case 'minlen':
33+
if (i.val().length < parseInt(exp)) {
34+
ferror = ierror = true;
35+
}
36+
break;
37+
38+
case 'email':
39+
if (!emailExp.test(i.val())) {
40+
ferror = ierror = true;
41+
}
42+
break;
43+
44+
case 'checked':
45+
if (! i.is(':checked')) {
46+
ferror = ierror = true;
47+
}
48+
break;
49+
50+
case 'regexp':
51+
exp = new RegExp(exp);
52+
if (!exp.test(i.val())) {
53+
ferror = ierror = true;
54+
}
55+
break;
56+
}
57+
i.next('.validation').html((ierror ? (i.attr('data-msg') !== undefined ? i.attr('data-msg') : 'wrong Input') : '')).show('blind');
58+
}
59+
});
60+
f.children('textarea').each(function() { // run all inputs
61+
62+
var i = $(this); // current input
63+
var rule = i.attr('data-rule');
64+
65+
if (rule !== undefined) {
66+
var ierror = false; // error flag for current input
67+
var pos = rule.indexOf(':', 0);
68+
if (pos >= 0) {
69+
var exp = rule.substr(pos + 1, rule.length);
70+
rule = rule.substr(0, pos);
71+
} else {
72+
rule = rule.substr(pos + 1, rule.length);
73+
}
74+
75+
switch (rule) {
76+
case 'required':
77+
if (i.val() === '') {
78+
ferror = ierror = true;
79+
}
80+
break;
81+
82+
case 'minlen':
83+
if (i.val().length < parseInt(exp)) {
84+
ferror = ierror = true;
85+
}
86+
break;
87+
}
88+
i.next('.validation').html((ierror ? (i.attr('data-msg') != undefined ? i.attr('data-msg') : 'wrong Input') : '')).show('blind');
89+
}
90+
});
91+
if (ferror) return false;
92+
else var str = $(this).serialize();
93+
var action = $(this).attr('action');
94+
if( ! action ) {
95+
action = 'contactform/contactform.php';
96+
}
97+
$.ajax({
98+
type: "POST",
99+
url: action,
100+
data: str,
101+
success: function(msg) {
102+
// alert(msg);
103+
if (msg == 'OK') {
104+
$("#sendmessage").addClass("show");
105+
$("#errormessage").removeClass("show");
106+
$('.contactForm').find("input, textarea").val("");
107+
} else {
108+
$("#sendmessage").removeClass("show");
109+
$("#errormessage").addClass("show");
110+
$('#errormessage').html(msg);
111+
}
112+
113+
}
114+
});
115+
return false;
116+
});
117+
118+
});

css/scss-files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The scss source files are available in the pro version.

0 commit comments

Comments
 (0)