1F1SOLUCOES.Default.Cadastro = (function () { 2 'use strict'; 3 var classButtonModal = " font-weight--700 font-size--xs cursor--pointer flex justify-content--center align-items--center padding--xs border-radius--4xs background-color--base-50 border--1 border-color--base-50 color--white flex__item--grow height--42px hover-background-color--base-50 hover-border-color--base-50", 4 $this = { 5 queryDeveloperHub: function (cnpj) { 6 $this.removeReadonly('.js-company', '#cnpj,#registration_municipal,#price_list_id,#segment_id'); 7 $this.removeReadonly('.js-addresses', '#address-complement, #address-reference'); 8 $.getJSON( $.f1s.baseUrl() + 'cliente/hub-desenvolvedor', {"cnpj": cnpj} ) 9 .done(function(res) { 10 if (!res.error) { 11 $(".cnpj-error").remove(); 12 let phone = res.result.telefone.split('/'); 13 let registrationState = res.result.inscricoes_estaduais.return === 'OK' ? res.result.inscricoes_estaduais.ie_uf_origem : ''; 14 if (res.result.inscricoes_estaduais.return === 'OK' && registrationState.length === 0 && res.result.inscricoes_estaduais.outras_ies.length > 0) { 15 for (let ie of res.result.inscricoes_estaduais.outras_ies) { 16 if (ie.ativado > 0 && ie.numero.length > 0) { 17 registrationState = ie.numero; 18 break; 19 } 20 } 21 } 22 if ($.f1s._info.hubDesenvolvedor.block_client_data) { 23 $this.applyReadonly('.js-company', '#cnpj,#registration_municipal,#price_list_id,#segment_id,#nome_vendedor'); 24 } 25 if ($.f1s._info.hubDesenvolvedor.block_client_address) { 26 $this.applyReadonly('.js-addresses', '#address-complement,#address-reference,#nome_vendedor'); 27 } 28 if (registrationState.length === 0 && $.f1s._info.hubDesenvolvedor.allow_edit_state_registration_on_empty) { 29 $('#registration_state').prop('readonly', false); 30 $('#registration_state_exempted, label:has(#registration_state_exempted)').css({"visibility": "visible"}); 31 } 32 if (String(res.result.fantasia).length === 0) { 33 res.result.fantasia = res.result.nome; 34 } 35 $('#name_corporate').val(res.result.nome); 36 $('#name_fancy').val(res.result.fantasia); 37 if (res.result.email && res.result.email.length > 0) { 38 $('#email').val(res.result.email); 39 } else if($.f1s._info.hubDesenvolvedor.allow_edit_email_on_empty) { 40 $('#email') 41 .removeProp('readonly') 42 .removeProp('tabindex') 43 .removeProp('aria-disabled'); 44 } 45 $('#registration_state').val(registrationState); 46 $('#phone_number').val(phone[0].trim()); 47 if($('#phone_number').val().length === 0 && $.f1s._info.hubDesenvolvedor.allow_edit_phone_on_empty) { 48 $('#phone_number').prop('readonly', false); 49 } 50 if ($('#cnae').length > 0) { 51 var cnae = res.result.atividade_principal.code.replace(/\D+/gi, ''); 52 if (parseInt(cnae) != 0) { 53 $('#cnae').val(cnae); 54 } 55 } 56 if ($('#secondary_cnaes').length > 0) { 57 var secondaryCnaes = []; 58 if (res.result.atividades_secundarias) { 59 for (var a in res.result.atividades_secundarias) { 60 var entry = res.result.atividades_secundarias[a]; 61 if (entry.code) { 62 var entryCode = entry.code.replace(/\D+/gi, ''); 63 if (parseInt(entryCode) != 0) { 64 secondaryCnaes.push(entryCode); 65 } 66 } 67 } 68 } 69 if (secondaryCnaes.length > 0) { 70 $('#secondary_cnaes').val(secondaryCnaes.join(',')); 71 } 72 } 73 $('#address-cep').val(res.result.cep.replace(/[^0-9-]+/gi, '')); 74 $('#address-street').val(res.result.logradouro); 75 $('#address-city').val(res.result.municipio); 76 $('#address-state').val(res.result.uf); 77 $('#address-number').val(res.result.numero); 78 $('#address-complement').val(res.result.complemento); 79 $('#address-neighborhood').val(res.result.bairro); 80 if ($.f1s._info.hubDesenvolvedor.allow_edit_address_on_empty) { 81 var addressFieldMap = [ 82 { key: 'cep', id: '#address-cep' }, 83 { key: 'logradouro', id: '#address-street' }, 84 { key: 'bairro', id: '#address-neighborhood' }, 85 { key: 'municipio', id: '#address-city' }, 86 { key: 'uf', id: '#address-state' }, 87 { key: 'numero', id: '#address-number' }, 88 { key: 'complemento',id: '#address-complement' }, 89 ]; 90 $.each(addressFieldMap, function(_, field) { 91 if (res.result[field.key].toString().length === 0) { 92 $(field.id).removeAttr('readonly'); 93 } 94 }); 95 } else if (res.result.bairro.toString().length === 0 && $.f1s._info.hubDesenvolvedor.allow_edit_neighborhood_on_empty) { 96 $('#address-neighborhood').removeAttr('readonly'); 97 } 98 } else if (res.message) { 99 $("#cnpj").after('<span class="cnpj-error input-message color--red-error">'+res.message+'</span>'); 100 } 101 }) 102 .fail(function(jqxhr, textStatus, error) { 103 let err = textStatus + ", " + error; 104 console.log( "Request Failed: " + err ); 105 }); 106 }, 107 applyReadonly: function(fieldset, notThisFields) { 108 let fields = $(fieldset).find('input, select, textarea').not(notThisFields); 109 fields.prop('readonly', true); 110 fields.attr({ 111 "tabindex" : -1, 112 "aria-disabled": "true" 113 }); 114 $(fieldset+' select').not(notThisFields).prop('disabled', true); 115 $(fieldset).find('#registration_state_exempted, label:has(#registration_state_exempted)').css({"visibility": "hidden"}); 116 }, 117 removeReadonly: function(fieldset, notThisFields) { 118 let fields = $(fieldset).find('input, select').not(notThisFields); 119 fields.prop('readonly', false); 120 fields.attr({ 121 "tabindex" : 0, 122 "aria-disabled": "false" 123 }); 124 $(fieldset+' select').not(notThisFields).prop('disabled', false); 125 $(fieldset).find('#registration_state_exempted, label:has(#registration_state_exempted)').css({"visibility": "visible"}); 126 } 127 }; 128 $this.init = function () { 129 F1SOLUCOES.Default.init(); 130 131 $('.register-form').on('submit', function() { 132 $('.register-form select').prop('disabled', false); 133 }); 134 135 if ($('#cnpj').val().length === 14 || $('#cnpj').val().length === 18) { 136 let cnpj = $('#cnpj').val().toUpperCase().replace(/[^A-Z0-9]/g, ''); 137 if ($(".js-registration-edit").length == 0 && $.f1s._info.hubDesenvolvedor.active) { 138 $this.queryDeveloperHub(cnpj); 139 } 140 } 141 142 $('input.cep').change(function () { 143 F1SOLUCOES.Default.consultarWebserviceEnderecoCep($(this)); 144 }); 145 146 $('.register-form #cnpj').on('change', function() { 147 if ($('#cnpj').val().length === 18) { 148 let cnpj = $('#cnpj').val().toUpperCase().replace(/[^A-Z0-9]/g, ''); 149 $.getJSON( $.f1s.baseUrl() + 'validate/cliente-cadastro', {"cnpj": cnpj} ) 150 .done(function(json) { 151 if (json === true) { 152 $(".cnpj-error").remove(); 153 if ($(".js-registration-edit").length == 0 && $.f1s._info.hubDesenvolvedor.active) { 154 $this.queryDeveloperHub(cnpj); 155 } 156 } else { 157 $("#cnpj").after('<span class="cnpj-error input-message color--red-error">'+f1s.configurations.clients.validateMessages.cnpj_exists+'</span>'); 158 } 159 }) 160 .fail(function(jqxhr, textStatus, error) { 161 var err = textStatus + ", " + error; 162 console.log( "Request Failed: " + err ); 163 }); 164 } else if ($(".js-registration-edit").length == 0) { 165 $this.removeReadonly('.js-company', '#cnpj,#registration_municipal,#price_list_id,#segment_id'); 166 $this.removeReadonly('.js-addresses', '#address-complement, #address-reference'); 167 } 168 }); 169 170 $('#cpf').change(function () { 171 var personType = $("[name=person_type]:checked").val(), 172 cpf = $("#cpf").val(); 173 if (cpf.length == 14) { 174 $.ajax({
175 url: [f1s.baseUrl, f1s.controller, 'pre-registration-verify'].join('/'), 176 type: 'post', 177 dataType: 'json', 178 data: {"person_type": personType, "cpf": cpf}, 179 success: function(res) { 180 if (!res.status) { 181 showAlertCpf(); 182 } 183 }, 184 error: function() { 185 186 } 187 }); 188 } 189 }); 190 if($('#contacts-password').length > 0) { 191 $('#contacts-password').on('input focus', function() { 192 var regex = new RegExp($(this).data('regex'), ""); 193 var passwordSize = $(this).data("password-size"); 194 var passwordLower = $(this).data("password-onelower"); 195 var passwordUpper = $(this).data("password-oneupper"); 196 var passwordSpecial = $(this).data("password-specialcharacter"); 197 var passwordOneNumber = $(this).data("password-onenumber"); 198 var passwordSequence = $(this).data("password-sequence"); 199 var msgFormat = ""; 200 201 var regexSize = eval("/^.{"+passwordSize+",}$/g") 202 var regexLower = /(?=.*[a-z])(?:(\S))/g 203 var regexUpper = /(?=.*[A-Z])(?:(\S))/g 204 var regexSpecial = /(?=.*[^0-9a-zA-Z\s])(?:(\S))/g 205 var regexOneNumber = /(?=.*\d)(?:(\S))/g 206 var regexSequence = eval("/^(?:(\\S)(?!\\1)){"+passwordSize+",}$/g") 207 208 if(passwordSize && regexSize.test($(this).val()) != true){ 209 msgFormat += `- No mÃnimo ${passwordSize} caracteres\n` 210 }if(passwordLower && regexLower.test($(this).val()) != true){ 211 msgFormat += `- Ao menos uma letra minúscula\n` 212 }if(passwordUpper && regexUpper.test($(this).val()) != true){ 213 msgFormat += `- Ao menos uma letra maiúscula\n` 214 }if(passwordSpecial && regexSpecial.test($(this).val()) != true){ 215 msgFormat += `- Ao menos um caractere especial\n` 216 }if(passwordOneNumber && regexOneNumber.test($(this).val()) != true){ 217 msgFormat += `- Ao menos um número\n` 218 }if(passwordSequence && regexSequence.test($(this).val()) != true){ 219 msgFormat += `- Não conter sequências de caracteres repetidos\n` 220 }if ($(this).val().length == 0 || regex.test($(this).val())) { 221 this.setCustomValidity(""); 222 } 223 224 this.reportValidity(); 225 this.setCustomValidity(msgFormat); 226 }); 227 } 228 229 if ($(".js-f1-view-password-icon").length > 0) { 230 231 $('.js-f1-view-password-icon').removeClass("hidden"); 232 $('.js-f1-view-password-icon').off('click'); 233 $('.js-f1-view-password-icon').on('click', function() { 234 var input = $(this).siblings("label").find("input"); 235 var icon = $(this).find("i"); 236 if (input.attr("type") === "password") { 237 input.attr("type", "text"); 238 icon.removeClass("fa-eye").addClass("fa-eye-slash"); 239 } else { 240 input.attr("type", "password"); 241 icon.removeClass("fa-eye-slash").addClass("fa-eye"); 242 } 243 }); 244 } 245 246 $('input[name="registration_state_exempted"]').click(function(ev) { 247 if ($(this).is(':checked')) { 248 $('input[name="registration_state"]').val("ISENTO").attr('readonly', 'readonly'); 249 } else { 250 $('input[name="registration_state"]').val("").removeAttr('readonly'); 251 } 252 }); 253 if ($('input[name="registration_state"]').val() == "ISENTO") { 254 $('input[name="registration_state_exempted"]').attr('checked', 'checked'); 255 $('input[name="registration_state"]').attr('readonly', 'readonly'); 256 } 257 $('.js-mask-phone').on("focus",function(){ 258 $(this).unmask(); 259 $(this).mask("(99) 9999-99999"); 260 }) 261 $('.js-mask-phone').keydown(function(e){ // números de celular de SP 262 var target, phone; 263 target = (e.currentTarget) ? e.currentTarget : e.srcElement; 264 phone = target.value.replace(/\D/g, ''); 265 266 }); 267 $('.js-mask-phone').blur(function(e){ // números de celular de SP 268 269 var target, phone; 270 target = (e.currentTarget) ? e.currentTarget : e.srcElement; 271 phone = target.value.replace(/\D/g, ''); 272 273 274 275 }); 276 277 278 $('.replicate').change(function() { 279 var element = $(this); 280 var name = element.attr('name'); 281 var arrayname = "js-" + name.slice(0, name.indexOf("[")); 282 if (element.is(":checked")) { 283 $('#'+arrayname).find('input,select').each(function() { 284 if ($(this).attr('name') != element.attr('name')) { 285 try{ 286 var cleanName = $(this).attr('name').match(/\[(.*?)\]/)[1]; 287 if (cleanName) { 288 if ($(this).is('select')) { 289 $(this).val($('select[name="address['+cleanName+']"]').val()).trigger('change'); 290 } else { 291 $(this).val($('input[name="address['+cleanName+']"]').val()); 292 } 293 } 294 $(this).attr('disabled', true); 295 }catch(e){}; 296 } 297 }) 298 } else { 299 $('#'+arrayname).find('input, select').each(function() { 300 $(this).removeAttr('disabled'); 301 }) 302 } 303 }).trigger('change'); 304 305 306 $("#comprar_empresa").on("click",function(){ 307 $( "#revendedor" ).prop( "checked", false );
308 $(".js-container_contrato_revendas").hide(); 309 $(".js-container_codigo_conduta").hide(); 310 $(".js-container_declaracao_pis_cofins").show(); 311 $(".js-questionario_conformidade").hide(); 312 $(".js-container_contrato_social").hide(); 313 $(".js-container_balancetes").show(); 314 $(".js-container_balanco_dre").show(); 315 $(".js-container_documento_bancario").show(); 316 }); 317 318 $("#revendedor").on("click",function(){ 319 $( "#comprar_empresa" ).prop( "checked", false ); 320 $(".js-container_contrato_revendas").show(); 321 $(".js-container_codigo_conduta").show(); 322 $(".js-container_declaracao_pis_cofins").show(); 323 $(".js-questionario_conformidade").show(); 324 $(".js-container_contrato_social").show(); 325 $(".js-container_balancetes").show(); 326 $(".js-container_balanco_dre").show(); 327 $(".js-container_documento_bancario").show(); 328 }); 329 var last_person_type = null; 330 // Controla se será mostrado os campos para registro de empresa jurÃdica ou pessoa fisÃca 331 $('.register-form #person_type').on('click', function() { 332 var changing = last_person_type != null && last_person_type != $(this).val(); 333 var isCorporate = $(this).val() == 'J'; 334 if (last_person_type == 'F' && changing == true) { 335 $('#cnpj').val(''); 336 } 337 else if (last_person_type == 'J' && changing == true) { 338 $('#cpf').val(''); 339 } 340 // CPF 341 $('#cpf').closest('.js-input-container').toggle(!isCorporate); 342 $('#name').closest('.js-input-container').toggle(!isCorporate); 343 //$(".container-nascimento").toggle(!isCorporate); 344 $(".container-atividadde").toggle(isCorporate); 345 346 // CNPJ 347 348 $('#contacts-role').closest('.js-input-container').toggle(isCorporate); 349 $('#cnpj').closest('.js-input-container').toggle(isCorporate); 350 $('#venda_mensal').closest('.js-input-container').toggle(isCorporate); 351 $('#area_atuacao').closest('.js-input-container').toggle(isCorporate); 352 $('#regime_piscofins').closest('.js-input-container').toggle(isCorporate); 353 $('#revendedor').closest('.js-input-container').toggle(isCorporate); 354 $('#comprar_empresa').closest('.js-input-container').toggle(isCorporate); 355 356 357 358 $('#name_corporate').closest('.js-input-container').toggle(isCorporate); 359 $('#name_fancy').closest('.js-input-container').toggle(isCorporate); 360 $('#registration_state').closest('.js-input-container').toggle(isCorporate); 361 $('#registration_municipal').closest('.js-input-container').toggle(isCorporate); 362 $('#registration_state_exempted').closest('#js-registration_state_exempted-row').toggle(isCorporate); 363 $('#suframa_code').closest('.js-input-container').toggle(isCorporate); 364 $('#suframa_expiration_date').closest('.js-input-container').toggle(isCorporate); 365 $('.bloco1').toggleClass("grid-template-columns--2fr"); 366 $('.bloco1').toggleClass("width--50"); 367 368 369 //$('#email_nfe').closest('.js-input-container').toggle(isCorporate); 370 //$('#phone_number').closest('.js-input-container').toggle(isCorporate); 371 $('#contacts-department').closest('.js-input-container').toggle(isCorporate); 372 $('#contacts-name').closest('.js-input-container').toggle(isCorporate); 373 $('#contacts-cpf').closest('.js-input-container').toggle(isCorporate); 374 $('#contacts-phone_number').closest('.js-input-container').toggle(isCorporate); 375 $('#contribuinte_icms').closest('.js-input-container').toggle(isCorporate); 376 $('#cod_mun_zfm').closest('.js-input-container').toggle(isCorporate); 377 $('#empresa_publica').closest('.js-input-container').toggle(isCorporate); 378 $('#cnpj_registered').closest('.js-input-container').toggle(isCorporate); 379 $('#has_register').parent().parent().toggle(isCorporate); 380 $('#special_regime').closest('.js-input-container').toggle(isCorporate); 381 $('#economic_group').closest('.js-input-container').toggle(isCorporate); 382 $('#website').closest('.js-input-container').toggle(isCorporate); 383 $('#facebook').closest('.js-input-container').toggle(isCorporate); 384 $('#instagram').closest('.js-input-container').toggle(isCorporate); 385 386 $(".js-contacts").toggle(isCorporate); 387 388 $('.js-bank').toggle(isCorporate); 389 $('.js-comerial').toggle(isCorporate); 390 391 392 showHideFieldsPersonType(isCorporate); 393 394 $("#revendedor").trigger("click"); 395 396 if($("#person_type").val("J").is(":checked")){ 397 const camposTabIndex = ['cnpj', 'name_corporate', 'registration_state', 'name_fancy', "cell_phone_number", "registration_municipal", "email", "registration_state", "phone_number", "address-cep", "address-number", "address-neighborhood", "address-state", "address-street", "address-complement", "address-city", "address-reference", "contacts-role", "contacts-name", "contacts-email", "contacts-birth_date", "contacts-cpf", "contacts-department", "contacts-phone_number", "contacts-cellphone_number", "contacts-password", "contacts-confirm"] 398 camposTabIndex.forEach(function(elem, index){ 399 $("#"+elem).attr("tabindex", index + 1); 400 }); 401 }else{ 402 const camposTabIndex = ['cpf', 'name', 'contacts-password', 'contacts-confirm', 'cell_phone_number', 'email', 'contacts-birth_date', 'phone_number', "address-cep", "address-number", "address-neighborhood", "address-state", "address-street", "address-complement", "address-city", "address-reference"] 403 camposTabIndex.forEach(function(elem, index){ 404 $("#"+elem).attr("tabindex", index + 1) 405 }) 406 } 407 408 if ($('input[name="client_type"]').length > 0) { 409 var clientType = $('input[name="client_type"]:checked').val().split(':')[0]; 410 var inputsWithClientTypes = $('.register-form input[data-client-types], .register-form select[data-client-types]'); 411 var fieldSets = []; 412 inputsWithClientTypes.each(function() { 413 var input = $(this); 414 var clientTypes = String(input.data('client-types')).split(','); 415 if (clientTypes.includes(clientType)) { 416 if (!fieldSets.includes(input.closest("fieldset"))) { 417 input.show(); 418 fieldSets.push(input.closest("fieldset")); 419 } 420 } else { 421 input.hide(); 422 input.closest("fieldset").hide(); 423 } 424 });
425 fieldSets.forEach(fieldSets => { 426 fieldSets.show(); 427 }); 428 } 429 resetTabIndex(); 430 }); 431 432 $('.register-form #client_type').on('click', function() { 433 var personType = $(this).val().split(':')[1]; 434 if ($('#person_type').length > 0) { 435 $('input[name="person_type"][value="'+personType+'"]').trigger("click") 436 } 437 $('.register-form #person_type:checked').trigger('click'); 438 }); 439 if ($('#client_type').length>0) { 440 $('input[name="client_type"]:checked').trigger("click") 441 } 442 $('.register-form #person_type:checked').trigger('click'); 443 444 if($(".tipo-F").length>0){ 445 showHideFieldsPersonType(false); 446 document.getElementById('name').value=document.getElementById('contacts-name').value; 447 } 448 449 450 451 $(".register-form").submit(function( event ) { 452 453 $('input[name$="[replicate]"').each(function (ix, el) { 454 455 if (!$(el).is(':checked')) { 456 $(el).trigger('click'); 457 } 458 }); 459 if($("#cnpj:visible").length==1){ var isCorporate = true } 460 461 if(!isCorporate){ 462 if(document.getElementById('contacts-cellphone_number').length>0){ 463 document.getElementById('contacts-cellphone_number').value=document.getElementById('cell_phone_number').value; 464 } 465 466 document.getElementById('contacts-email').value=document.getElementById('email').value; 467 document.getElementById('contacts-name').value=document.getElementById('name').value; 468 469 } 470 try{ 471 $('.js-f1-view-password-icon') 472 .siblings("label") 473 .find('input[type="text"]') 474 .attr("type", "password"); 475 } 476 catch(e){}; 477 }); 478 479 let contactEmail = $('#contacts-email'); 480 if (contactEmail.length > 0 && f1s && f1s.configurations && f1s.configurations.clients && f1s.configurations.clients.allowExistingContactEmailOnRegistration) { 481 contactEmail.on('change', function(ev) { 482 let val = $(this).val(); 483 $.ajax({
484 url: [f1s.baseUrl, 'cliente', 'check-contact-email'].join('/'), 485 type: 'post', 486 dataType: 'json', 487 data: {"email": val}, 488 success: function(res) { 489 if (res.message) { 490 bootbox.alert({ 491 title: 'Cadastro', 492 message: res.message, 493 buttons: { 494 ok: {className: "button "+classButtonModal} 495 } 496 }); 497 } 498 }, 499 error: function() { 500 } 501 }); 502 }); 503 } 504 505 function showAlertCpf(){ 506 bootbox.alert({ 507 title: 'Cadastro', 508 message: `Seu cpf não é elegÃvel para cadastro.<br><br>Entre em contato conosco`, 509 buttons: { 510 ok: {className: "button "+classButtonModal} 511 512 }, 513 callback: function () { 514 window.location.reload(); 515 } 516 }); 517 } 518 519 resetTabIndex(); 520 }; 521 return $this; 522}()); 523$(function () { 524 'use strict'; 525 F1SOLUCOES.Default.Cadastro.init(); 526}); 527function resetTabIndex(){ 528 try{ 529 var $camposVisiveis = $("input:visible, select:visible, textarea:visible"); 530 $camposVisiveis.each(function(index) { 531 $(this).attr("tabindex", index + 1); // tabindex começa em 1 532 }); 533 }catch(e){} 534} 535function showHideFieldsPersonType(isCorporate){ 536 537 if(isCorporate){ 538 $(".container-observacao").show(); 539 //$(".container-nascimento").hide(); 540 $('#contacts-role').closest('.js-input-container').find('.js-input-label').html("*Cargo"); 541 $('.js-titulo-contato').html('Dados de login') 542 $('.js-titulo-empresa').html($('.js-titulo-empresa').data("text-pj") ? $('.js-titulo-empresa').data("text-pj") : 'Cadastro da Empresa'); 543 $('.container-cargo').insertBefore('.container-email-login'); 544 $('.js-cnae').show(); 545 546 $(".container-password,.js-container-password").appendTo(".placement-password-pj"); 547 $(".container-confirmation,.js-container-confirmation").appendTo(".placement-confirm-password-pj"); 548 549 //document.getElementById('contacts-role').value=''; 550 if($(".js-registration-edit").length==0 && $(".is-error").length==0){ 551 $('input[type=text]#contacts-name').val(''); 552 $('input[type=text]#contacts-role').val(''); 553 $('input[type=text]#contacts-email').val(''); 554 document.getElementById('contacts-email').value=''; 555 document.getElementById('contacts-name').value=''; 556 document.getElementById('contacts-cellphone_number').value=''; 557 } 558 $('#contacts-name').closest('.js-input-container').insertBefore(".container-email-login"); 559 $('.container-nascimento').insertAfter($('#contacts-email').closest('.js-input-container')); 560 561 $(".js-contacts").show(); 562 563 }else{ 564 $(".container-observacao").hide(); 565 $('.js-cnae').hide(); 566 //$(".container-nascimento").insertBefore(".container-observacao"); 567 //$('#contacts-role').closest('.js-input-container').find('.js-input-label').html("*Profissão") 568 $('.container-cargo').insertBefore('.placement-password-fields-pf'); 569 $('.js-titulo-contato').html('Contato') 570 $('.js-titulo-empresa').html($('.js-titulo-empresa').data("text-pj") ? $('.js-titulo-empresa').data("text-pf") : 'Cadastro'); 571 $('.js-addresses__title').html('Endereço') 572 $(".container-password,.js-container-password").appendTo(".placement-password-pf"); 573 $(".container-confirmation,.js-container-confirmation").appendTo(".placement-confirm-password-pf"); 574 $('.container-nascimento').insertAfter($('#phone_number').closest('.js-input-container')); 575 576 //$('input[type=text]#contacts-role').val('pessoa fÃsica'); 577 578 //document.getElementById('contacts-role').value="pessoa fÃsica"; 579 if($(".js-registration-edit").length==0){ 580 if($('.js-cnae').length>0){ 581 document.getElementById('cnae').value='0'; 582 } 583 $('input[type=text]#contacts-email').val($('input[type=text]#email').val()); 584 $('input[type=text]#contacts-name').val($('input[type=text]#name').val());
585 //document.getElementById('contacts-email').value=document.getElementById('email').value; 586 //document.getElementById('contacts-name').value=document.getElementById('name').value; 587 //document.getElementById('contacts-cellphone_number').value=document.getElementById('cell_phone_number').value; 588 } 589 //$(".js-contacts").hide(); 590 $('#contacts-name').closest('.js-input-container').insertBefore(".container-cargo"); 591 592 } 593}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.