Revize 366cd6f3
Přidáno uživatelem Jan Pašek před téměř 4 roky(ů)
static/js/certificate.js | ||
---|---|---|
8 | 8 |
loading: true, |
9 | 9 |
error: false, |
10 | 10 |
id: null, |
11 |
revocationReason: "unspecified", |
|
11 | 12 |
certificate: { |
12 | 13 |
subject: { |
13 | 14 |
C: "", |
... | ... | |
68 | 69 |
onPrivateKeyDownload(this.id); |
69 | 70 |
}, |
70 | 71 |
onRevoke: function () { |
71 |
|
|
72 |
document.body.scrollTop = 0; |
|
73 |
document.documentElement.scrollTop = 0; |
|
74 |
axios.patch(API_URL + "certificates/"+this.id, { |
|
75 |
status: "revoked", |
|
76 |
reason: this.revocationReason |
|
77 |
}) |
|
78 |
.then(function (response) { |
|
79 |
if(response.data["success"]) { |
|
80 |
certificateDetailsApp.successMessage = "Certificate revocation successful."; |
|
81 |
} |
|
82 |
else { |
|
83 |
certificateDetailsApp.errorMessage = "Certificate cannot be revoked - "+response.data["data"]+"!"; |
|
84 |
} |
|
85 |
}) |
|
86 |
.catch(function (error) { |
|
87 |
certificateDetailsApp.errorMessage = "An error occurred while revoking certificate"; |
|
88 |
}); |
|
72 | 89 |
}, |
73 | 90 |
onDelete: function () { |
74 | 91 |
|
Také k dispozici: Unified diff
Re #8583 - Revocation finished, deletion modal