This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("endereco").readOnly = true; | |
document.getElementById("bairro").readOnly = true; | |
document.getElementById("cidade").readOnly = true; | |
document.getElementById("uf").readOnly = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('cep').addEventListener('blur', function() { | |
var cep = this.value.replace(/\D/g, ''); // Remove qualquer caractere não numérico | |
if (cep.length === 8) { // Verifica se tem 8 dígitos | |
fetch('https://viacep.com.br/ws/' + cep + '/json/') | |
.then(response => response.json()) | |
.then(data => { | |
if (!data.erro) { | |
document.getElementById('endereco').value = data.logradouro; | |
document.getElementById('bairro').value = data.bairro; | |
document.getElementById('cidade').value = data.localidade; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Incluir a biblioteca Inputmask --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/inputmask/5.0.6/inputmask.min.js"></script> | |
<script> | |
// Aplique a máscara para CPF e Telefone quando o DOM estiver carregado | |
document.addEventListener("DOMContentLoaded", function() { | |
// Máscara para CPF | |
var cpfInput = document.querySelector('input[name="cpf"]'); // Ajuste o seletor conforme necessário | |
if (cpfInput) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.addEventListener("DOMContentLoaded", function() { | |
var cpfField = document.querySelector('input[name="c_cpf"]'); // Altere para o nome correto do campo | |
if(cpfField) { | |
cpfField.addEventListener('input', function(e) { | |
var value = e.target.value.replace(/\D/g, ''); | |
if (value.length <= 11) { | |
value = value.replace(/(\d{3})(\d{3})(\d{3})(\d{1})/, '$1.$2.$3-$4'); | |
} | |
e.target.value = value; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Copie e cole no campo HTML do seu projeto*/ | |
document.addEventListener('DOMContentLoaded', function() { | |
const campoTelefone = document.querySelector('input[name="telefone"]'); // Substitua pelo nome do seu campo | |
if (campoTelefone) { | |
campoTelefone.addEventListener('input', function() { | |
let valor = this.value.replace(/\D/g, ''); // Remove tudo que não for número | |
if (valor.length <= 10) { | |
valor = valor.replace(/(\d{2})(\d{4})(\d{4})/, '($1) $2-$3'); // Formato (XX) XXXX-XXXX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Todos os input tipo TEXT começarem com letras maiusculas*/ | |
document.addEventListener('DOMContentLoaded', function() { | |
// Selecione todos os campos que você deseja aplicar a máscara | |
const campos = document.querySelectorAll('input[type="text"]'); // ou outro seletor de campo | |
campos.forEach(function(campo) { | |
campo.addEventListener('input', function() { | |
// Converte a primeira letra de cada palavra para maiúscula | |
this.value = this.value.replace(/\b\w/g, function(letra) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* copie este código e cole no seu campo html*/ | |
/* Para os textos começarem com letras maiusculas*/ | |
document.addEventListener('DOMContentLoaded', function() { | |
// Substitua 'input-selector' pelo seletor correto do campo que você deseja alterar. | |
const campo = document.querySelector('input[name="seu_input"]'); | |
if (campo) { | |
campo.addEventListener('input', function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AO INSERIR A IMAGEM DA SUALOGO COLOCA A CLASSE "logo" | |
E NO ICONE DO MENU COLOQUE "sidebar-toggle" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Entre com o usuario root na sua VPS e insira o comando abaixo | |
IMPORTANTE: | |
Certifique de que o subdominio 'Server' esteja devidamente apontado para IP do seu servidor | |
========================================================== | |
v-change-sys-hostname server.seudominio.com.br | |
v-add-letsencrypt-host |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('check_admin_referer', 'logout_without_confirm', 10, 2); | |
function logout_without_confirm($action, $result) | |
{ | |
/** | |
* Allow logout without confirmation | |
*/ | |
if ($action == "log-out" && !isset($_GET['_wpnonce'])) { | |
$redirect_to = isset($_REQUEST['redirect_to']) ? $_REQUEST['redirect_to'] : 'inicio'; |