scriptlet para el login del SAT

This commit is contained in:
Sandino Araico Sánchez 2024-04-07 01:44:11 -06:00
parent a8fcf57221
commit dc8c9ce193
Signed by: KBrown
GPG key ID: 991D5D40CC62244F

29
SAT/js/scriptlet.js Normal file
View file

@ -0,0 +1,29 @@
var firmar2 = function() {
//validate();
var rfc = document.getElementById("rfc").value;
console.log('RFC obtenido: ' + rfc);
var numSerie = obtieneNumSerie();
console.log('Numero de serie: ' + numSerie);
var co = document.getElementById("tokenuuid").value + "|" + rfc + "|" + numSerie;
$("#privateKeyPassword").val(co);
}
var remove_priv_key_input = function() {
var tokenUUID = document.getElementById("tokenuuid").value;
console.log('Token UUID: ' + tokenUUID);
$("#privateKeyPassword").val(tokenUUID);
$("#privateKeyPassword").prop("type", "text");
$("#privateKeyPassword").prop( "disabled", true );
$('#fileCertificate').remove();
$('#txtCertificate').remove();
$('button[name="btnCertificate"]').remove();
$('label[for="txtCertificate"]').remove()
$('#filePrivateKey').remove();
$('#txtPrivateKey').remove();
$('button[name="btnPrivateKey"]').remove();
$('label[for="txtPrivateKey"]').remove()
$('label[for="privateKeyPassword"]').text("Token UUID")
}