Skip to content

Initial Commit #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .idea/eStartup.iml

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

7 changes: 7 additions & 0 deletions .idea/misc.xml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

434 changes: 434 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Thanks for downloading this theme!

Theme Name: eStartup
Theme URL: https://bootstrapmade.com/estartup-bootstrap-landing-page-template/
Author: BootstrapMade.com
Author URL: https://bootstrapmade.com
2 changes: 2 additions & 0 deletions contactform/Readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fully working PHP/AJAX contact form is available in the pro version.
You can buy it from: https://bootstrapmade.com/estartup-bootstrap-landing-page-template/
118 changes: 118 additions & 0 deletions contactform/contactform.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
jQuery(document).ready(function($) {
"use strict";

//Contact
$('form.contactForm').submit(function() {
var f = $(this).find('.form-group'),
ferror = false,
emailExp = /^[^\s()<>@,;:\/]+@\w[\w\.-]+\.[a-z]{2,}$/i;

f.children('input').each(function() { // run all inputs

var i = $(this); // current input
var rule = i.attr('data-rule');

if (rule !== undefined) {
var ierror = false; // error flag for current input
var pos = rule.indexOf(':', 0);
if (pos >= 0) {
var exp = rule.substr(pos + 1, rule.length);
rule = rule.substr(0, pos);
} else {
rule = rule.substr(pos + 1, rule.length);
}

switch (rule) {
case 'required':
if (i.val() === '') {
ferror = ierror = true;
}
break;

case 'minlen':
if (i.val().length < parseInt(exp)) {
ferror = ierror = true;
}
break;

case 'email':
if (!emailExp.test(i.val())) {
ferror = ierror = true;
}
break;

case 'checked':
if (! i.is(':checked')) {
ferror = ierror = true;
}
break;

case 'regexp':
exp = new RegExp(exp);
if (!exp.test(i.val())) {
ferror = ierror = true;
}
break;
}
i.next('.validation').html((ierror ? (i.attr('data-msg') !== undefined ? i.attr('data-msg') : 'wrong Input') : '')).show('blind');
}
});
f.children('textarea').each(function() { // run all inputs

var i = $(this); // current input
var rule = i.attr('data-rule');

if (rule !== undefined) {
var ierror = false; // error flag for current input
var pos = rule.indexOf(':', 0);
if (pos >= 0) {
var exp = rule.substr(pos + 1, rule.length);
rule = rule.substr(0, pos);
} else {
rule = rule.substr(pos + 1, rule.length);
}

switch (rule) {
case 'required':
if (i.val() === '') {
ferror = ierror = true;
}
break;

case 'minlen':
if (i.val().length < parseInt(exp)) {
ferror = ierror = true;
}
break;
}
i.next('.validation').html((ierror ? (i.attr('data-msg') != undefined ? i.attr('data-msg') : 'wrong Input') : '')).show('blind');
}
});
if (ferror) return false;
else var str = $(this).serialize();
var action = $(this).attr('action');
if( ! action ) {
action = 'contactform/contactform.php';
}
$.ajax({
type: "POST",
url: action,
data: str,
success: function(msg) {
// alert(msg);
if (msg == 'OK') {
$("#sendmessage").addClass("show");
$("#errormessage").removeClass("show");
$('.contactForm').find("input, textarea").val("");
} else {
$("#sendmessage").removeClass("show");
$("#errormessage").addClass("show");
$('#errormessage').html(msg);
}

}
});
return false;
});

});
1 change: 1 addition & 0 deletions css/scss-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The scss source files are available in the pro version.
Loading