Se ha producido un error al procesar la plantilla.
Unable to find Velocity template with ID _TEMPLATE_CONTEXT_/109967/111471/20102/539628
1##adjuntamos la hoja de estilos
2#parse ( "$templatesPath/539628" ) ## VelSimetrica_Form-css.vm
3#parse ( "$templatesPath/539641" ) ## VelSimetrica_Form-mapa-nv.vm
4#parse ( "$templatesPath/539644" ) ## VelSimetrica_Form-form-nv.js
5
6<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
7
8<script src="/documents/111471/127077/ajax.js/f56e1953-0d05-47b1-b9a3-db22d4968b30" type="text/javascript"></script>
9<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
10
11<main>
12
13 <div class="contentWeb">
14
15 <div class="h1">Selecciona la <span style="font-weight: 400;">Velocidad Simétrica</span> de tu interés</div>
16
17 <form name="v3_Form_form" id="v3_Form_form" method="POST" action="">
18
19 <div class="h2">¡Disfruta <span style="font-weight: 400;">8 meses SIN COSTO</span> de <span style="font-weight: 400;">Velocidad Simétrica!</span></div>
20
21 <div class="contentBox">
22
23 <div class="inpTxtCentrado">
24 <select id="selServicio" placeholder="Selecciona Paquete + Velocidad Simétrica">
25 <option value="0">Selecciona Paquete + Velocidad Simétrica</option>
26 <option value="399">Paquete Infinitum 399 (10 megas) + Velocidad Simétrica</option>
27 <option value="549">Paquete Infinitum 549 (30 megas) + Velocidad Simétrica</option>
28 <option value="799">Paquete Infinitum 799 (100 megas) + Velocidad Simétrica</option>
29 <option value="1499">Paquete Infinitum 1499 (150 megas) + Velocidad Simétrica</option>
30 <option value="1789">Paquete Infinitum 1789 (200 megas) + Velocidad Simétrica</option>
31 </select>
32 <span class="errMessage" id="errPaquete" >* Campo obligatorio</span>
33 </div>
34
35 <div class="inpTxtGrande">
36 <span style="font-size: 2.2em;margin-top: 60px;display: block;font-weight: 400;">Datos de contacto</span><br>
37 <span style="font-size: 1.5em;font-weight: 500;">1. Proporciona tus datos y te contactaremos a la brevedad</span>
38 </div>
39
40 <div class="inpTxt">
41 <input type="text" id="txtNombre" rel="errNombre" />
42 <label>Nombre</label>
43 <span class="errMessage" id="errNombre" >* Campo obligatorio</span>
44 </div>
45
46 <div class="inpTxt">
47 <input type="text" id="txtPaterno" rel="errPaterno" />
48 <label>Apellido Paterno</label>
49 <span class="errMessage" id="errPaterno" >* Campo obligatorio</span>
50 </div>
51
52 <div class="inpTxt">
53 <input type="text" id="txtTelAlter" class="numeros" maxlength="10" />
54 <label>Celular</label>
55 <span class="errMessage" id="errTelAlter" >* Favor de ingresar un número válido (10 dígitos).</span>
56 </div>
57
58 <div class="inpTxt">
59 <input type="text" id="txtCorreo" rel="errCorreo" />
60 <label>Correo electrónico</label>
61 <span class="errMessage" id="errCorreo" >* Campo obligatorio</span>
62 </div>
63
64
65
66
67 <div class="inpTxtGrande">
68 <span style="font-size: 1.5em;font-weight: 500;">2. Ingresa la dirección donde deseas el servicio</span>
69 </div>
70
71 <div class="inpTxt">
72 <input type="text" id="txtCalle" rel="errCalle" />
73 <label>Calle</label>
74 <!--<span class="errMessage" id="errCalle" >* Campo obligatorio</span>-->
75 </div>
76
77 <div class="inpTxt dos">
78 <input type="text" id="txtNumExt" rel="errNumExt" />
79 <label>Número exterior</label>
80 <!--<span class="errMessage" id="errNumExt" >* Campo obligatorio</span>-->
81 </div>
82
83 <div class="inpTxt dos">
84 <input type="text" id="txtNumInt" rel="errNumInt" />
85 <label>Número interior</label>
86 <!--<span class="errMessage" id="errNumInt" >* Campo obligatorio</span>-->
87 </div>
88
89
90 <div class="inpTxt">
91 #set ( $form_elem_label = "Estado" )
92 #set ( $form_elem_name = "mapa_dir_estado_id_select" )
93
94 <select id="$form_elem_name" name="$form_elem_name" onchange="fnValidarVal(this.name);" >
95 <option value="0">$form_elem_label</option>
96 </select>
97
98 <span class="errMessage" id="errEstado" >* Campo obligatorio</span>
99 </div>
100
101 <div class="inpTxt">
102 #set ( $form_elem_label = "Delegación / Municipio" )
103 #set ( $form_elem_name = "mapa_dir_municipio_select" )
104
105 <select id="$form_elem_name" name="$form_elem_name" disabled="disabled" onchange="fnValidarVal(this.name);" readonly >
106 <option value="0">$form_elem_label</option>
107 </select>
108
109 <span class="errMessage" id="errMunicipio" >* Campo obligatorio</span>
110 </div>
111
112 <div class="inpTxt">
113 #set ( $form_elem_label = "Colonia" )
114 #set ( $form_elem_name = "mapa_dir_colonia_select" )
115
116 <select id="$form_elem_name" name="$form_elem_name" disabled="disabled" onchange="fnValidarVal(this.name);" readonly >
117 <option value="0">$form_elem_label</option>
118 </select>
119
120 <span class="errMessage" id="errColonia" >* Campo obligatorio</span>
121 </div>
122
123 <div class="inpTxt">
124 #set ( $form_elem_label = "Código Postal" )
125 #set ( $form_elem_name = "mapa_dir_cp_select" )
126
127 <select id="$form_elem_name" name="$form_elem_name" disabled="disabled" onchange="fnValidarVal(this.name);" readonly >
128 <option value="0">$form_elem_label</option>
129 </select>
130
131 <span class="errMessage" id="errCP" >* Campo obligatorio</span>
132 </div>
133
134 </div>
135
136 <div class="btns" id="btnContinua">Continuar</div>
137
138 </form>
139 </div>
140
141</main>
142
143
144
145
146<a href="#v3_Form_submit_msg_working"
147 id="v3_Form_submit_msg_working_for_fancy"></a>
148<div class="v3_Form_submit_msg_working"
149 id="v3_Form_submit_msg_working"
150 >
151 <div class="v3_Form_submit_msg_working_titulo">
152 Estamos validando tus datos.
153 </div>
154 <div class="v3_Form_submit_msg_working_titulo_sub">
155 Espera un momento...
156 </div>
157 <div class="v3_Form_submit_msg_working_img">
158 <img src="/documents/111471/127026/anim_cargaUpsell2.gif/214e79d0-149e-4c21-9539-bdd2243c9497?t=1593646351000" alt="..." class="">
159 </div>
160</div> <!-- <div class="v3_Form_submit_msg_working" -->
161
162
163<script>
164$(document).ready(function(){
165 function formEl(elem){
166 $(elem).each(function(){
167 $(this).focus(function(){
168 $(this).next().addClass("activoLb");
169 });
170 $(this).blur(function(){
171 if($(this).val() === '' || $(this).val() === 'blank'){
172 $(this).next().removeClass("activoLb");
173 }
174 });
175 });
176 }
177
178 formEl(".inpTxt input");
179 $(".validaS a").click(function(){
180 $(".inpTxt").fadeIn();
181 });
182
183
184 $(".inpTxt label").click(function(){
185 $(this).addClass("activoLb");
186 $(this).parent(".inpTxt").find("input").focus();
187 });
188
189 $( "input" ).focus(function() {
190 $( this ).next( "span" ).hide();
191 });
192});
193
194
195
196function fnv3_submit_msg( pboMostrar, divID ) {
197 var lightbox_width = 350;
198 var lightbox_height = 300;
199
200 if ( pboMostrar ) {
201 $( "#" + divID ).fancybox(
202 {
203 padding : 0
204 , margin : 0
205 , width : lightbox_width
206 , height : lightbox_height
207
208 , closeBtn : false
209
210 , autoSize : false
211 , autoHeight : false
212
213 , fitToView : true
214 , autoResize : true
215 , autoScale : true
216
217 , openEffect : 'fade'
218 , closeEffect : 'fade'
219
220 , modal : true
221 , beforeShow : function () {
222 this.width = lightbox_height;
223 this.height = lightbox_height;
224 }
225 , helpers :
226 {
227 overlay :
228 {
229 css :
230 {
231 'background' : 'rgba(58, 42, 45, 0.3)'
232 }
233 }
234 }
235
236 }
237 ).trigger( 'click' );
238 }
239 else {
240 jQuery.fancybox.close();
241 }
242
243}
244
245$('.inpTxt #dinamic, .inpTxt3 #dinamic').click(function(){return false;});
246
247$(".numeros").keydown(function(event) {
248 if(event.shiftKey){
249 event.preventDefault();
250 }
251
252 if (event.keyCode == 46 || event.keyCode == 8) {
253 }else {
254 if (event.keyCode < 95) {
255 if ( (event.keyCode < 48 || event.keyCode > 57) && event.keyCode != 9) {
256 event.preventDefault();
257 }
258 }
259 else {
260 if ((event.keyCode < 96 || event.keyCode > 105) && event.keyCode != 9) {
261 event.preventDefault();
262 }
263 }
264 }
265});
266
267
268$("input").keyup(function(){
269 $(".errMessage").hide();
270});
271
272$("#mySelect").change(function(){
273
274 if( $("#mySelect").val() == "OTRO" ){
275 $("#txtOtroGiro").removeAttr("disabled");
276 $("#dinamic").css("background-color","#FFF");
277 $('#dinamic').click(function(){return true;});
278 }else{
279 $("#txtOtroGiro").attr("disabled","disabled");
280 $("#dinamic").css("background-color","#EEE");
281 $('#dinamic').click(function(){return false;});
282 }
283
284});
285
286
287function validateEmail(email) {
288 var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
289
290 return re.test(email);
291}
292
293
294var servicio = "";
295var nombre = "";
296var paterno = "";
297var telAlter = "";
298var correo = "";
299var calle = "";
300var numExt = "";
301var numInt = "";
302var estado = "";
303var municipio = "";
304var colonia = "";
305var cp = "";
306
307
308$("#btnContinua").click(function(){
309
310 flag = true;
311
312 servicio = $("#selServicio").val();
313 nombre = $("#txtNombre").val();
314 paterno = $("#txtPaterno").val();
315 telAlter = $("#txtTelAlter").val();
316 correo = $("#txtCorreo").val();
317 calle = $("#txtCalle").val();
318 numExt = $("#txtNumExt").val();
319 numInt = $("#txtNumInt").val();
320
321 estadoVal = $("#mapa_dir_estado_id_select option:selected").val();
322 municipioVal = $("#mapa_dir_municipio_select option:selected").val();
323 coloniaVal = $("#mapa_dir_colonia_select option:selected").val();
324 cpVal = $("#mapa_dir_cp_select option:selected").val();
325
326 estado = $("#mapa_dir_estado_id_select option:selected").text();
327 municipio = $("#mapa_dir_municipio_select option:selected").text();
328 colonia = $("#mapa_dir_colonia_select option:selected").text();
329 cp = $("#mapa_dir_cp_select option:selected").text();
330
331
332//console.info(flag);
333//console.info(correo);
334 // validaciones
335
336 if(servicio == 0){
337 $("#errPaquete").show();
338 flag = false;
339 //console.info(flag + ' servicio');
340 }
341
342 if(nombre == ""){
343 $("#errNombre").show();
344 flag = false;
345 //console.info(flag + ' nombre');
346 }
347
348 if(paterno == ""){
349 $("#errPaterno").show();
350 flag = false;
351 //console.info(flag + ' paterno');
352 }
353
354 if(telAlter == "" || telAlter.length < 10){
355 $("#errTelAlter").show();
356 flag = false;
357 //console.info(flag + ' telAlter');
358 }
359
360 if (validateEmail(correo)) {
361
362 } else {
363 $("#errCorreo").show();
364 flag = false;
365 //console.info(flag + ' correo');
366 }
367
368 /*if(calle == ""){
369 $("#errCalle").show();
370 flag = false;
371 console.info(flag + ' calle');
372 }
373
374 if(numExt == ""){
375 $("#errNumExt").show();
376 flag = false;
377 console.info(flag + ' numext');
378 }
379
380 if(numInt == ""){
381 $("#errNumInt").show();
382 flag = false;
383 console.info(flag + ' numint');
384 }*/
385
386
387//console.info(flag + ' el segundo');
388
389
390
391 if(flag == true){
392
393
394 // enviamos los campos vacios
395 if(estadoVal == 0){
396 var estado = "";
397 }
398
399 if(municipioVal == 0){
400 var municipio = "";
401 }
402
403 if(coloniaVal == 0){
404 var colonia = "";
405 }
406
407 if(cpVal == 0){
408 var cp = "";
409 }
410
411//console.info(estadoVal + municipioVal + coloniaVal + cpVal);
412
413
414
415 #* /* var url ='http://10.105.124.2/dev/tomapedido/simetrico.php?op=nuevo'; */ *#
416 var url ='https://apcomercial.telmex.com/dev/tomapedido/simetrico.php?op=nuevo';
417 var valores = JSON.stringify({
418
419 "paquete": servicio,
420 "nombre": nombre,
421 "paterno": paterno,
422 "celular": telAlter,
423 "email": correo,
424 "calle": calle,
425 "num_ext": numExt,
426 "num_int": numInt,
427 "estado": estado,
428 "del_mun": municipio,
429 "colonia": colonia,
430 "cp": cp,
431 });
432
433
434 //console.log(url);
435 //console.log(valores);
436
437 jQuery.ajax({
438 data: valores,
439 url: url,
440 type: 'post',
441 dataType: "json",
442 contentType: "application/json",
443 beforeSend: function () {
444 },
445 success: function (response) {
446 //console.log(JSON.stringify(response));
447
448
449 /*{\"error\":{\"codigo\":\"00\",\"descripcion\":\"Exito\",\"descTecnica\":{\"folio\":2}}}","status":200,"statusText":"OK"}*/
450
451
452 if(response.error.codigo == 00){
453 window.location.href = "/web/contrata/velocidad-simetrica-exito";
454 }else{
455 window.location.href = "/web/contrata/velocidad-simetrica-error";
456 }
457
458 },
459 error: function(response){
460 //console.log(JSON.stringify(response));
461 window.location.href = "/web/contrata/velocidad-simetrica-error";
462 }
463 });
464
465
466 }
467
468
469});
470
471
472
473</script>