FEATURE #2341 @4h: add basics for template
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
$(document).foundation()
|
||||
|
||||
$ ('#formSend').click (function () {
|
||||
$ (this).value = 'Odesílám...';
|
||||
|
||||
var form = $(this).closest('form');
|
||||
|
||||
$.ajax ({
|
||||
url: form.attr('action'),
|
||||
method: 'post',
|
||||
data: form.serialize ()
|
||||
}).done (function (resp) {
|
||||
if (resp.status == 'success') {
|
||||
alert ('Zpráva úspěšně odeslána. Odpovíme co nejdříve!');
|
||||
window.top.location.reload ();
|
||||
} else {
|
||||
alert (resp.message);
|
||||
}
|
||||
$ (this).value = "ODESLAT";
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user