mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-23 16:44:59 +03:00
Привел обработку ошибок в примерах к единообразию
This commit is contained in:
parent
56e5e2ff17
commit
4739fe3b9f
@ -18,10 +18,6 @@ function SystemInfo() {
|
||||
})();
|
||||
});
|
||||
|
||||
if (!systemInfo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<legend>Информация о системе</legend>
|
||||
|
@ -7,7 +7,7 @@
|
||||
var $certificate = document.getElementById('certificate'),
|
||||
$createSignature = document.getElementById('createSignature'),
|
||||
$certificateDetails = document.getElementById('certificateDetails'),
|
||||
$certificateError = document.getElementById('certificateError');
|
||||
$certificateError = document.getElementById('certificateListError');
|
||||
|
||||
$certificate.addEventListener('change', function handleCertSelection() {
|
||||
var thumbprint = $certificate.value;
|
||||
@ -26,6 +26,6 @@
|
||||
$certificate.appendChild($certOption);
|
||||
});
|
||||
}, function (error) {
|
||||
$certificateError.textContent = '\n' + error.message;
|
||||
$certificateError.textContent = error.message;
|
||||
});
|
||||
})();
|
||||
|
@ -43,12 +43,12 @@
|
||||
}, function (error) {
|
||||
$signature.placeholder = 'Не создана';
|
||||
|
||||
$signatureError.textContent = '\n' + error.message;
|
||||
$signatureError.textContent = error.message;
|
||||
});
|
||||
}, function (error) {
|
||||
$hash.placeholder = 'Не вычислен';
|
||||
|
||||
$hashError.textContent = '\n' + error.message;
|
||||
$hashError.textContent = error.message;
|
||||
});
|
||||
});
|
||||
})();
|
||||
|
@ -16,6 +16,6 @@
|
||||
}, handleError);
|
||||
|
||||
function handleError(error) {
|
||||
$systemInfoError.textContent = '\n' + error.message;
|
||||
$systemInfoError.textContent = error.message;
|
||||
}
|
||||
})();
|
||||
|
@ -18,11 +18,13 @@
|
||||
<select id="certificate" tabindex="-1" required>
|
||||
<option disabled selected>Не выбран</option>
|
||||
</select>
|
||||
<pre id="certificateListError"></pre>
|
||||
|
||||
<details id="certificateDetails">
|
||||
<summary>Информация о сертификате</summary>
|
||||
<pre id="certificateInfo"></pre>
|
||||
</details>
|
||||
<pre id="certificateError"></pre>
|
||||
<pre id="certificateInfoError"></pre>
|
||||
|
||||
<label>Тип подписи: *</label>
|
||||
<br>
|
||||
@ -44,6 +46,8 @@
|
||||
|
||||
<label for="signature">Подпись (PKCS7):</label><br>
|
||||
<textarea id="signature" cols="80" rows="30" placeholder="Не создана"></textarea>
|
||||
<pre id="signatureError"></pre>
|
||||
|
||||
<p>
|
||||
Для
|
||||
<a href="https://www.gosuslugi.ru/pgu/eds/"
|
||||
@ -54,8 +58,6 @@
|
||||
<br>
|
||||
для отделенной подписи (или *.sig для совмещенной).
|
||||
</p>
|
||||
|
||||
<pre id="signatureError"></pre>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
@ -7,7 +7,7 @@
|
||||
var $certificate = document.getElementById('certificate'),
|
||||
$certificateDetails = document.getElementById('certificateDetails'),
|
||||
$certificateInfo = document.getElementById('certificateInfo'),
|
||||
$certificatesError = document.getElementById('certificatesError');
|
||||
$certificatesError = document.getElementById('certificateInfoError');
|
||||
|
||||
$certificateDetails.style.display = 'none';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user