Revize aca9f61d
Přidáno uživatelem Jan Pašek před asi 4 roky(ů)
static/js/create_certificate.js | ||
---|---|---|
6 | 6 |
notBefore: "", |
7 | 7 |
notAfter: "", |
8 | 8 |
isSelfSigned: false, |
9 |
invalidCN: false, |
|
9 | 10 |
// available certificate authorities |
10 | 11 |
authorities: [], |
11 | 12 |
// data of the selected certificate authorities to be displayed in the form |
... | ... | |
63 | 64 |
return; |
64 | 65 |
} |
65 | 66 |
if(this.certificateData.subject.CN === "") { |
66 |
this.showError("CN field must be filled in!") // TODO highlight the field |
|
67 |
this.showError("CN field must be filled in!") |
|
68 |
this.invalidCN = true; |
|
67 | 69 |
return; |
68 | 70 |
} |
69 | 71 |
this.certificateData.validityDays = parseInt(this.certificateData.validityDays); |
... | ... | |
101 | 103 |
var endDate = new Date(new Date().getTime()+(val*24*60*60*1000)); |
102 | 104 |
this.notAfter = endDate.toDateInputValue(); // init notAfter to today + validityDays |
103 | 105 |
}, |
106 |
'certificateData.subject.CN': function (val, oldVal) { |
|
107 |
if (val !== '') this.invalidCN = false; |
|
108 |
}, |
|
104 | 109 |
'certificateData.CA': function (val, oldVal) { |
105 | 110 |
// self-signed certificate - all fields are empty |
106 | 111 |
if (val === "null" || val == null) { |
Také k dispozici: Unified diff
Re #8583 Certificate creation - highlight CN if empty