$(function(){ $('#keyword').keypress(function (e) { var key = e.which; if(key == 13) // the enter key code { $("#quick-search").click(); return false; } }); $("#quick-search").click(function(){ var keyword=$("#keyword").val(); url="http://www.iclars.ecrm.cl/search.html?keyword="+$("#keyword").val(); if($("#keyword").val().length>=5){ window.location.href=url; }else{ alert("La palabrass ingresada debe ser mayor a 5 caracteres"); } }); }) var registro = document.getElementById("submit-register2"); registro.onclick = validateRegistro; window.submitRegistro = submitRegistro; $(function () { }); function validateRegistro(e){ var form = $('#register-form'); if (form.find("[name='crm_contacto[app]']").val() == "") { $("#msj").html("Please enter a Family Name").removeClass("d-none"); form.find("[name='crm_contacto[app]']").focus(); return false; } if (form.find("[name='crm_contacto[nombre]']").val() == "") { $("#msj").html("Please enter a First Name").removeClass("d-none"); form.find("[name='crm_contacto[nombre]']").focus(); return false; } if (form.find("[name='crm_consultas[campo_1]']").val() == "") { $("#msj").html("Please enter a Title").removeClass("d-none"); form.find("[name='crm_consultas[campo_1]']").focus(); return false; } if (form.find("[name='crm_consultas[campo_2]']").val() == "") { $("#msj").html("Please enter an Affiliation").removeClass("d-none"); form.find("[name='crm_consultas[campo_2]']").focus(); return false; } if (!/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.([a-z]){2,4})$/.test(form.find("[name='crm_contacto[email]']").val())) { $("#msj").html("Please enter a valid Email").removeClass("d-none"); form.find("[name='crm_contacto[email]']").focus(); return false; } if (form.find("[name='crm_contacto[direccion]']").val() == "") { $("#msj").html("Please enter an Address").removeClass("d-none"); form.find("[name='crm_contacto[direccion]']").focus(); return false; } if (form.find("[name='crm_contacto[region]']").val() == "") { $("#msj").html("Please enter a Country").removeClass("d-none"); form.find("[name='crm_contacto[region]']").focus(); return false; } if (form.find("[name='crm_contacto[comuna]']").val() == "") { $("#msj").html("Please enter a City").removeClass("d-none"); form.find("[name='crm_contacto[comuna]']").focus(); return false; } if (form.find("[name='crm_contacto[rut]']").val() == "") { $("#msj").html("Please enter a Zip Code").removeClass("d-none"); form.find("[name='crm_contacto[rut]']").focus(); return false; } if (form.find("[name='crm_contacto[campo_4]']").val() == "") { $("#msj").html("Please upload your CV").removeClass("d-none"); form.find("[name='crm_contacto[rut]']").focus(); return false; } if(!$('#politica').prop('checked')) { $("#msj").html("You need to accept the privacy policy").removeClass("d-none"); //form.find("[name='politica']").focus(); return false; } $("#msj").html("").addClass("d-none"); form.find('[type="submit"]').attr('disabled', 'disabled').html(' Sending...'); grecaptcha.execute(); } function submitRegistro(token){ $('#register-form').submit(); } $(function(){ let locationPath = document.location.pathname; console.log(locationPath); if (locationPath != "/" ){ $(".img-higlights").css("width", "70%"); $(".higlights-webbinar").css("width","44%"); } else { $(".higlights-webbinar").css("width","65%"); } }) $(function(){ }) $(function(){ })