From 6269079af38c47f671b38ac3b3638e393f9f04f4 Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Thu, 12 Oct 2017 16:49:43 -0500 Subject: [PATCH] Subir certificados ok --- source/static/js/controller/admin.js | 35 ++++++++++++---------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/source/static/js/controller/admin.js b/source/static/js/controller/admin.js index 74dbfd5..47c90b8 100644 --- a/source/static/js/controller/admin.js +++ b/source/static/js/controller/admin.js @@ -309,28 +309,23 @@ function cmd_subir_certificado_click(){ var rfc = $$('form_cert').getValues()['cert_rfc'] - try{ + if(rfc){ + msg = 'Ya existe un certificado guardado

¿Deseas reemplazarlo?' + webix.confirm({ + title: 'Certificado Existente', + ok: 'Si', + cancel: 'No', + type: 'confirm-error', + text: msg, + callback:function(result){ + if(result){ + $$('up_cert').send() + } + } + }) + }else{ $$('up_cert').send() - }catch(err){ - msg_error(err.message) } - - - //~ if(rfc){ - //~ msg = 'Ya existe un certificado guardado

¿Deseas reemplazarlo?' - //~ webix.confirm({ - //~ title: 'Certificado Existente', - //~ ok: 'Si', - //~ cancel: 'No', - //~ type: 'confirm-error', - //~ text: msg, - //~ callback:function(result){ - //~ if(result){ - //~ $$('up_cert').send() - //~ } - //~ } - //~ }) - //~ } }