Esto es lo que veo relativo al formulario en el main.js:
Código Javascript
:
Ver original// Register form process function
$("#register-form").submit(function() {
var submitData = $(this).serialize();
var $email = $(this).find("input[name='email']");
var $name = $(this).find("input[name='name']");
var $phone = $(this).find("input[name='phone']");
var $submit = $(this).find("input[name='submit']");
var output = '';
$email.attr('disabled','disabled');
$name.attr('disabled','disabled');
$phone.attr('disabled','disabled');
$submit.attr('disabled','disabled');
$.ajax({ // Send an offer process with AJAX
type: "POST",
url: "register.php",
data: submitData + "&action=add",
dataType: "html",
success: function(msg){
if(parseInt(msg, 0) !== 0) {
var msg_split = msg.split("|");
if(msg_split[0] === "success") {
$email.val('').removeAttr('disabled');
$name.val('').removeAttr('disabled');
$phone.val('').removeAttr('disabled');
$submit.removeAttr('disabled');
output += '<div class="submit-status submit-status-success">' + msg_split[1] + '</div>';
$("body").prepend(output).find(".submit-status").hide().slideDown().delay(4000).slideUp(function() { $(this).remove(); });
} else {
$email.removeAttr('disabled');
$name.removeAttr('disabled');
$phone.removeAttr('disabled');
$submit.removeAttr('disabled');
output += '<div class="submit-status submit-status-error">' + msg_split[1] + '</div>';
$("body").prepend(output).find(".submit-status").hide().slideDown().delay(4000).slideUp(function() { $(this).remove(); });
}
}
}
});
return false;
});