{"id":850,"date":"2025-03-12T17:58:58","date_gmt":"2025-03-12T20:58:58","guid":{"rendered":"https:\/\/indique.urbsaluga.com.br\/?page_id=850"},"modified":"2025-04-07T08:56:40","modified_gmt":"2025-04-07T11:56:40","slug":"urbs-leads-interno-complemento-de-dados","status":"publish","type":"page","link":"https:\/\/indique.urbsaluga.com.br\/?page_id=850","title":{"rendered":"Urbs Leads Interno &#8211; Complemento de dados"},"content":{"rendered":"    <style>\n        .toggle-titulo {\n            cursor: pointer;\n            background-color: #0073aa;\n            color: white;\n            padding: 10px;\n            border-radius: 5px;\n            margin-bottom: 10px;\n        }\n\n        .formulario-toggle {\n            display: none;\n            margin-top: 10px;\n            padding: 15px;\n            border: 1px solid #ddd;\n            border-radius: 5px;\n            background: #f9f9f9;\n        }\n    <\/style>\n\n    <div class=\"toggle-titulo\" onclick=\"document.getElementById('formularioColaboradorToggle').classList.toggle('ativo'); document.getElementById('formularioColaboradorToggle').style.display = document.getElementById('formularioColaboradorToggle').classList.contains('ativo') ? 'block' : 'none';\">\n        + Criar Novo Colaborador\n    <\/div>\n\n    <div class=\"formulario-toggle\" id=\"formularioColaboradorToggle\">\n        <form id=\"colaboradorForm\" onsubmit=\"return enviarFormularioColaborador(event)\">\n            <div>\n                <label>Nome *<\/label>\n                <input type=\"text\" name=\"nome\" required>\n            <\/div>\n            <div>\n                <label>Digite o seu CPF *<\/label>\n                <input type=\"text\" name=\"cpf_colaborador\" required>\n            <\/div>\n            <div>\n                <label>Senha *<\/label>\n                <input type=\"text\" name=\"Senha_Colaborador\" required>\n            <\/div>\n            <div>\n                <label>Email *<\/label>\n                <input type=\"email\" name=\"email_colaborador\" required>\n            <\/div>\n            <div>\n                <label>Telefone *<\/label>\n                <input type=\"text\" name=\"telefone_colaborador\" required>\n            <\/div>\n            <div>\n                <label>Cargo *<\/label>\n                <select name=\"opcao_escolhida\" required>\n                    <option value=\"\">-- Selecione --<\/option>\n                    <option value=\"Captador\">Captador<\/option>\n                    <option value=\"Gerente Comercial\">Gerente Comercial<\/option>\n                    <option value=\"Backoffice\">Backoffice<\/option>\n                    <option value=\"Contact\">Contact<\/option>\n                <\/select>\n            <\/div>\n            <input type=\"hidden\" name=\"action\" value=\"criar_colaborador_ajax\">\n            <input type=\"hidden\" name=\"security\" value=\"4b40c40fe8\">\n            <div>\n                <button type=\"submit\">Salvar<\/button>\n            <\/div>\n        <\/form>\n        <div id=\"mensagemColaborador\"><\/div>\n    <\/div>\n\n    <script>\n    function enviarFormularioColaborador(event) {\n        event.preventDefault();\n        const form = document.getElementById('colaboradorForm');\n        const formData = new FormData(form);\n\n        fetch('https:\/\/indique.urbsaluga.com.br\/wp-admin\/admin-ajax.php', {\n            method: 'POST',\n            body: formData\n        })\n        .then(res => res.json())\n        .then(data => {\n            const mensagem = document.getElementById('mensagemColaborador');\n            if (data.success) {\n                mensagem.innerHTML = '<p style=\"color:green\">' + data.data + '<\/p>';\n                form.reset();\n            } else {\n                mensagem.innerHTML = '<p style=\"color:red\">' + (data.data || 'Erro ao salvar.') + '<\/p>';\n            }\n        })\n        .catch(err => {\n            console.error('Erro:', err);\n            document.getElementById('mensagemColaborador').innerHTML = '<p style=\"color:red\">Erro de comunica\u00e7\u00e3o.<\/p>';\n        });\n\n        return false;\n    }\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-850","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/pages\/850","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=850"}],"version-history":[{"count":4,"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/pages\/850\/revisions"}],"predecessor-version":[{"id":1093,"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=\/wp\/v2\/pages\/850\/revisions\/1093"}],"wp:attachment":[{"href":"https:\/\/indique.urbsaluga.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}