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()
- //~ }
- //~ }
- //~ })
- //~ }
}