Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#btn-form").on('click', function () {
- error_username = false;
- error_email = false;
- error_password = false;
- error_retype_password = false;
- error_checkbox = false;
- error_captcha = false;
- check_form_name();
- check_form_email();
- check_form_senha();
- check_form_reSenha();
- check_form_termo();
- check_form_captcha();
- if (error_username == false && error_email == false && error_password == false && error_retype_password == false && error_checkbox == false && error_captcha == false) {
- var url = "https://portal.meuacerto.com.br/api/site/CadastrarConsumidor"
- ShowLoadingIcon('btn-form');
- $.post({
- url: url,
- type: "POST",
- crossDomain: true,
- data: {
- NomeRazaoSocial: $("#form_name").val(),
- Email: $("#form_email").val(),
- Senha: $("#form_senha").val(),
- ConfirmacaoSenha: $("#form_reSenha").val(),
- AceiteTermosUso: $("#form_checkbox").is(":checked")
- },
- success: function (data) {
- // RD STATION
- $.ajax( {
- url: $.data(document.body, 'ajaxUrl' ),
- type: 'POST',
- cache: false,
- data: {
- action : 'send_to_rd',
- nome : $("#form_name").val(),
- email : $("#form_email").val(),
- rd_id : 'form-cadastro-home'
- }
- });
- LimparCamposConsumidor();
- HideLoadingIcon('btn-form');
- result = JSON.parse(data);
- if (result.CadastroEfetuado) {
- $("#myModal").modal('show');
- $("#containerLogin").hide();
- $("#respostaCadastro").show();
- $("#respCad").html(result.MensagemSucesso);
- }
- }
- });
- } else {
- }
- });
- });// Valida os campos do formulário de cadastro do CONSUMIDOR
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement