Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions views/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,15 @@ script
}
});
}

function genId() {
var result='';
for(var i=0; i<32; i++) {
result += Math.floor(Math.random()*16).toString(16).toUpperCase();
}
return result;
}

function switchToFillInfo() {
var common_name = document.getElementById('cnStart').value;
document.getElementById('cn').value = common_name;
Expand All @@ -146,7 +148,6 @@ script
return;
}


$('#start').hide();
$('#hero').hide();
$('#warning-note').hide();
Expand Down Expand Up @@ -203,17 +204,14 @@ script
});
console.log('done');
}
function switchToDownload() {
//$('#start').hide();
//$('#hero').hide();

function switchToDownload() {
console.log("validity: " + $('#form-fillinfo').valid());
if (!$('#form-fillinfo').valid()) {
console.log('info form is not valid. returning...');
return;
}


var certData = {};
$("#form-fillinfo input[type=text]").each(function() {
console.log($(this).attr('id') + ' - ' + $(this).val());
Expand All @@ -225,7 +223,7 @@ script
console.log(certId);
console.log(JSON.stringify(certData));

$('#button-submit').button('loading');
$('#button-submit').text('loading');

$.ajax({
type: 'POST',
Expand All @@ -235,14 +233,6 @@ script
success: function(data) {
var result = data;;

//console.log('data:' + data);
//try {
// result = JSON.parse(data);
//} catch(err) {
// console.error('Can not parse data: ' + err);
// return;
//}

if (!result.id || result.id === "")
{
console.error('Did not got cert Id. Can not continue');
Expand All @@ -262,13 +252,12 @@ script
console.log('Text: ' + $('#pfxlabel').text());
console.log('Pass: ' + pass);

//$('#pfxlabel').attr('text',

completeSwitchToDownload();
}
});

}

function completeSwitchToDownload() {
$('#fillinfo').hide();
$('#download').show();
Expand Down