forked from LaconicNetwork/kompose
Adds the new kompose site and moves it to the /docs folder so that it's compatible with old links as well as gh-pages
32 lines
1008 B
JavaScript
32 lines
1008 B
JavaScript
|
|
|
|
$(function () {
|
|
"use strict";
|
|
|
|
$('#contact-form').validator();
|
|
|
|
$('#contact-form').on('submit', function (e) {
|
|
if (!e.isDefaultPrevented()) {
|
|
var url = "assets/php/contact.php";
|
|
|
|
$.ajax({
|
|
type: "POST",
|
|
url: url,
|
|
data: $(this).serialize(),
|
|
success: function (data)
|
|
{
|
|
var messageAlert = 'alert-' + data.type;
|
|
var messageText = data.message;
|
|
|
|
var alertBox = '<div class="alert ' + messageAlert + ' alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' + messageText + '</div>';
|
|
if (messageAlert && messageText) {
|
|
$('#contact-form').find('.messages').html(alertBox);
|
|
$('#contact-form')[0].reset();
|
|
}
|
|
}
|
|
});
|
|
return false;
|
|
}
|
|
})
|
|
});
|