-
Notifications
You must be signed in to change notification settings - Fork 0
/
errataopen.html
60 lines (59 loc) · 1.52 KB
/
errataopen.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<html>
<head>
<script>
<!--
function redirect() {
var searchitem = document.getElementById("search");
var numberPattern = /:\d+/;
var numberPattern2 = /\d+/;
var ert = searchitem.value.match( numberPattern );
if (ert === null) {
ert = searchitem.value.match( numberPattern2 );
} else {
ert = String(ert).match( numberPattern2 );
}
if (ert === null) {
document.getElementById("errmsg").textContent = "ERROR parsing: " + searchitem.value
} else {
document.getElementById("errmsg").textContent = ""
document.getElementById("pg").textContent = "Forwarding to ErrataTool: " + ert + ' ...'
window.location.replace("https://errata.engineering.redhat.com/advisory/" + ert);
}
}
-->
</script>
<style>
html, body {
height: 100%;
}
.parent {
width: 100%;
height: 100%;
display: table;
text-align: center;
}
.parent > .child {
display: table-cell;
vertical-align: middle;
}
.jku {
background-color: green;
}
.errmsg {
background-color: red;
color: white;
}
</style>
</head>
<body>
<section class="parent"> <div class="child">
<form action="javascript:redirect()">
<span id="errmsg" class="errmsg"></span>
<div class="jku" id="pg">
<label>Erratum number : <input id="search" type="search" autofocus> </label>
<button type="submit">Go to ErrataTool</button>
</div>
</form>
</div> </section>
</body>
</html>