Add contact representative component with form validation
This commit is contained in:
206
.vscode/ftp-kr.sync.cache.json
vendored
Normal file
206
.vscode/ftp-kr.sync.cache.json
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
{
|
||||
"ftp://inwestprofil.sk@ftp@inwestprofil.sk": {
|
||||
"public_html": {
|
||||
"404.html": {
|
||||
"type": "-",
|
||||
"size": 1016,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"admin": {},
|
||||
"ajax.php": {
|
||||
"type": "-",
|
||||
"size": 5704,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"autoload": {},
|
||||
"config.php": {
|
||||
"type": "-",
|
||||
"size": 157,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"cron.php": {
|
||||
"type": "-",
|
||||
"size": 1339,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"devel.html": {
|
||||
"type": "-",
|
||||
"size": 5546,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"download.php": {
|
||||
"type": "-",
|
||||
"size": 1570,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"googleffb0c50d229c3be3.html": {
|
||||
"type": "-",
|
||||
"size": 53,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
".htaccess": {
|
||||
"type": "-",
|
||||
"size": 70929,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"images": {},
|
||||
"index.php": {
|
||||
"type": "-",
|
||||
"size": 6844,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"layout": {},
|
||||
"libraries": {},
|
||||
"plugins": {},
|
||||
"restore.php": {
|
||||
"type": "-",
|
||||
"size": 9257,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"robots.txt": {
|
||||
"type": "-",
|
||||
"size": 163,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"sitemap.xml": {
|
||||
"type": "-",
|
||||
"size": 13607,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
},
|
||||
"temp": {},
|
||||
"templates": {},
|
||||
"templates_user": {
|
||||
"articles": {
|
||||
"article-entry.php": {
|
||||
"type": "-",
|
||||
"size": 2013,
|
||||
"lmtime": 1747166474839,
|
||||
"modified": false
|
||||
},
|
||||
"article-full.php": {
|
||||
"type": "-",
|
||||
"size": 9727,
|
||||
"lmtime": 1747166474946,
|
||||
"modified": false
|
||||
},
|
||||
"article-gallery.php": {
|
||||
"type": "-",
|
||||
"size": 12124,
|
||||
"lmtime": 1747166475048,
|
||||
"modified": false
|
||||
},
|
||||
"article-miniature.php": {
|
||||
"type": "-",
|
||||
"size": 825,
|
||||
"lmtime": 1747166475154,
|
||||
"modified": false
|
||||
},
|
||||
"article.php": {
|
||||
"type": "-",
|
||||
"size": 9287,
|
||||
"lmtime": 1747166475257,
|
||||
"modified": false
|
||||
},
|
||||
"articles-entries.php": {
|
||||
"type": "-",
|
||||
"size": 468,
|
||||
"lmtime": 1747166475360,
|
||||
"modified": false
|
||||
},
|
||||
"articles-miniatures.php": {
|
||||
"type": "-",
|
||||
"size": 220,
|
||||
"lmtime": 1747166475464,
|
||||
"modified": false
|
||||
},
|
||||
"news.php": {
|
||||
"type": "-",
|
||||
"size": 1957,
|
||||
"lmtime": 1747166475572,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"menu": {
|
||||
"main-menu.php": {
|
||||
"type": "-",
|
||||
"size": 1666,
|
||||
"lmtime": 1747166475677,
|
||||
"modified": false
|
||||
},
|
||||
"menu.php": {
|
||||
"type": "-",
|
||||
"size": 143,
|
||||
"lmtime": 1747166475778,
|
||||
"modified": false
|
||||
},
|
||||
"pages.php": {
|
||||
"type": "-",
|
||||
"size": 2258,
|
||||
"lmtime": 1747166475879,
|
||||
"modified": false
|
||||
},
|
||||
"submenu.php": {
|
||||
"type": "-",
|
||||
"size": 1790,
|
||||
"lmtime": 1747166475994,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"site": {
|
||||
"contact.php": {
|
||||
"type": "-",
|
||||
"size": 10930,
|
||||
"lmtime": 1747167083404,
|
||||
"modified": false
|
||||
},
|
||||
"copyright.php": {
|
||||
"type": "-",
|
||||
"size": 134,
|
||||
"lmtime": 1747166476201,
|
||||
"modified": false
|
||||
},
|
||||
"languages.php": {
|
||||
"type": "-",
|
||||
"size": 1023,
|
||||
"lmtime": 1747166476307,
|
||||
"modified": false
|
||||
},
|
||||
"pager.php": {
|
||||
"type": "-",
|
||||
"size": 1614,
|
||||
"lmtime": 1747166476409,
|
||||
"modified": false
|
||||
},
|
||||
"title.php": {
|
||||
"type": "-",
|
||||
"size": 21,
|
||||
"lmtime": 0,
|
||||
"modified": false
|
||||
}
|
||||
},
|
||||
"_components": {
|
||||
"michalowce-contact.php": {
|
||||
"type": "-",
|
||||
"size": 5935,
|
||||
"lmtime": 1747167551560,
|
||||
"modified": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"upload": {}
|
||||
}
|
||||
},
|
||||
"$version": 1
|
||||
}
|
||||
181
templates_user/_components/obchodny-zastupca.php
Normal file
181
templates_user/_components/obchodny-zastupca.php
Normal file
@@ -0,0 +1,181 @@
|
||||
<? global $lang;?>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div id="scontainer-32">
|
||||
<div class="scontainer-content" id="scontainer-32-content">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p>
|
||||
Kamil Drąg<br>
|
||||
<strong>Obchodný zástupca</strong><br>
|
||||
<a href="mailto:dragkamil@inwestprofil.pl">dragkamil@inwestprofil.pl</a><br>
|
||||
<a href="tel:+48601840625">+48 601 840 625</a><br>
|
||||
<a href="tel:+421940553053">+421 940 553 053</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<form class="form-horizontal" id="contact-form">
|
||||
<div id="contact-form">
|
||||
<div class="form-group row">
|
||||
<div class="col-12">
|
||||
<label for="email">E-mail*</label>
|
||||
<input type="text" id="email" name="email" class="form-control" placeholder="E-mail*">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12">
|
||||
<label for="phone">Telefón č*</label>
|
||||
<input type="text" id="phone" name="phone" class="form-control" placeholder="Telefón č*">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12">
|
||||
<label for="subject">Téma*</label>
|
||||
<input type="text" id="subject" name="subject" placeholder="Temat" value="Dopyt z inwestprofil.sk" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12">
|
||||
|
||||
<label for="text">Správa*</label>
|
||||
<textarea id="text" name="text" class="form-control" rows="5" placeholder="Správa"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 small">
|
||||
<input type="checkbox" id="agreement" name="agreement" required="required" style="position: relative; top: 2px;"> Správcom osobných údajov je Inwest Profil. Údaje zadané v kontaktnom formulári budú spracované za účelom odpovede na zaslaný dopyt.
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class="col-12 text-center">
|
||||
<a class="btn btn-success" id="contact-form-send" onclick="send_message(); return false;">poslať</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script class="footer" type="text/javascript">
|
||||
function send_message() {
|
||||
var email = $.trim($('#contact-form #email').val());
|
||||
var phone = $.trim($('#contact-form #phone').val());
|
||||
var subject = $.trim($('#contact-form #subject').val());
|
||||
var text = $.trim($('#contact-form #text').val());
|
||||
|
||||
if (email === '' && phone === '') {
|
||||
$.alert({
|
||||
title: 'Omyl',
|
||||
content: 'Vyplňte svoju e-mailovú adresu a telefónne číslo.',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Zavrieť',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$('#contact-form #agreement').is(':checked')) {
|
||||
$.alert({
|
||||
title: 'Omyl',
|
||||
content: 'Vyjadrite svoj súhlas so zasielaním obchodnej ponuky.',
|
||||
type: 'orange',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Zavrieť',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
url: 'ajax.php',
|
||||
data: {
|
||||
a: 'contact_form',
|
||||
email: email,
|
||||
phone: phone,
|
||||
subject: subject,
|
||||
text: text
|
||||
},
|
||||
beforeSend: function() {
|
||||
alert1 = $.alert({
|
||||
title: 'Informácie',
|
||||
content: 'Čakajte prosím',
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|60000',
|
||||
columnClass: 'col-sm-6',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Zavrieť',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
success: function(data) {
|
||||
response = jQuery.parseJSON(data);
|
||||
alert1.close();
|
||||
|
||||
if (response.status === 'ok')
|
||||
return document.location.href = "/kontakt-sent";
|
||||
else
|
||||
var msg = 'Pri odosielaní správy sa vyskytla chyba. Skúste to znova. Ospravedlňujeme sa.';
|
||||
|
||||
$('#contact-formp-big #email, #contact-form-big #text').val('');
|
||||
|
||||
$.alert({
|
||||
title: 'Informácie',
|
||||
content: msg,
|
||||
type: 'blue',
|
||||
closeIcon: true,
|
||||
closeIconClass: 'fa fa-close',
|
||||
typeAnimated: true,
|
||||
animation: 'opacity',
|
||||
autoClose: 'confirm|10000',
|
||||
columnClass: 'col-sm-6',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Zavrieť',
|
||||
btnClass: 'btn-blue',
|
||||
keys: ['enter'],
|
||||
action: function() {}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user