You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.1 KiB

function registrationSuccess(data){
if (data.success){
location.reload();
}
else{
console.log(data);
//var $error = $("<tr>").attr("class", "error").append(
// $("<td>"));
}
}
$(document).ready(function () {
placeInput('100%');
$('#id_code_country').select2({
width: '95px'
});
$.fancybox.open([
{
href : '#end-reg'
}
], {
padding : 0,
fitToView: false,
closeBtn : false, // hide close button
closeClick : false, // prevents closing when clicking INSIDE fancybox
helpers : {
// prevents closing when clicking OUTSIDE fancybox
overlay : {closeClick: false}
},
keys : {
// prevents closing when press ESC button
close : null
}
});
$('#end-reg-form').on('submit', function(e){
e.preventDefault();
var url = $(this).attr('action');
var formData = $(this).serialize();
$.post(url, formData, registrationSuccess)
});
});