summaryrefslogtreecommitdiffstats
path: root/dogtag/ca-ui/shared/webapps/ca/agent/ca/ProfileReview.template
blob: 4e27f5245b97350dceab632f2ebe79317856a8c8 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<!-- --- BEGIN COPYRIGHT BLOCK ---
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation; version 2 of the License.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License along
     with this program; if not, write to the Free Software Foundation, Inc.,
     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

     Copyright (C) 2007 Red Hat, Inc.
     All rights reserved.
     --- END COPYRIGHT BLOCK --- -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<CMS_TEMPLATE>
<style>
TABLE { border-spacing: 0 0; }
</style>

<script type="text/javascript">
function escapeValue(value)
{
   return value.replace(/"/g,'&quot;');
}

function addEscapes(str)
{
    var outStr = str.replace(/</g, "&lt;");
    outStr = outStr.replace(/>/g, "&gt;");
    return outStr;
}

document.writeln('<font size="+1" face="PrimaSans BT, Verdana, sans-serif">Request ');
document.writeln(requestId);
document.writeln('<br></font>');
</script>
<font size="-1" face="PrimaSans BT, Verdana, sans-serif"></font>
<table border="0" cellspacing="0" cellpadding="0" background="/ca/agent/graphics/hr.gif"
width="100%">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<p>
<script type="text/javascript">
if (requestStatus == 'pending') {
  document.writeln('<form method=post action="profileProcess">');
  document.writeln('<input type=hidden name=requestId value=' + requestId + '>');
}
document.writeln('<p>');
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Request Information</FONT></TD></TR></TABLE>');
document.writeln('<table border=1 width=100%>');
document.writeln('<tr>');
document.writeln('<td width=20%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Request ID:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestId);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Request Type:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestType);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Request Status:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestStatus);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Requestor Host:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileRemoteHost);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Assigned To:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestOwner);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Creation Time:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestCreationTime);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Modification Time:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(requestModificationTime);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('<p>');
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Certificate Profile Information</FONT></TD></TR></TABLE>');
document.writeln('<table border=1 width=100%>');
document.writeln('<tr>');
document.writeln('<td width=20%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Certificate Profile Id:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileId);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td width=20%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Approved By:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileApprovedBy);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Certificate Profile Name:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileName);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('<tr>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Certificate Profile Description:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileDesc);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('<p>');
if (requestStatus != 'pending') {
  document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Additional Notes</FONT></TD></TR></TABLE>');
  document.writeln('<table width=100% border=1>');
  document.writeln('<tr>');
  document.writeln('<td>');
  document.writeln(requestNotes);
  document.writeln('</td>');
  document.writeln('</tr>');
  document.writeln('</table>');
  document.writeln('<p>');
}
if (profileIsVisible == 'true') {
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Certificate Profile Inputs</FONT></TD></TR></TABLE>');
document.writeln('<table border=1 width=100%>');
document.writeln('<tr>');
document.writeln('<td width=20%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Id</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td width=40%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Input Names</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Input Values</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
for (var i = 0; i < inputListSet.length; i++) {
  document.writeln('<tr>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(inputListSet[i].inputId);
document.writeln('</FONT>');
  document.writeln('</td>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(inputListSet[i].inputName);
document.writeln('</FONT>');
  document.writeln('</td>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(addEscapes(inputListSet[i].inputVal));
document.writeln('</FONT>');
  document.writeln('</td>');
  document.writeln('</tr>');
}
document.writeln('</table>');
document.writeln('<p>');
}
if (requestStatus == 'complete') {
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Certificate Profile Outputs</FONT></TD></TR></TABLE>');
for (var i = 0; i < outputListSet.length; i++) {
    document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">'
);
    document.writeln('<li>');
    document.writeln(outputListSet[i].outputName);
    document.writeln('</FONT>');
    document.writeln('<p>');
    if (outputListSet[i].outputSyntax == 'string') {
      document.writeln(outputListSet[i].outputVal);
    } else if (outputListSet[i].outputSyntax == 'pretty_print') {
      document.writeln('<pre>');
      document.writeln(outputListSet[i].outputVal);
      document.writeln('</pre>');
    } else if (outputListSet[i].outputSyntax == 'der_b64') {
      document.writeln('<pre>');
      document.writeln('-----BEGIN CERTIFICATE-----');
      document.writeln(outputListSet[i].outputVal);
      document.writeln('-----END CERTIFICATE-----');
      document.writeln('</pre>');
    }
    document.writeln('</p>');
}
}
if (requestStatus == 'pending') {
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Policy Information</FONT></TD></TR></TABLE>');
document.writeln('<table>');
document.writeln('<tr>');
document.writeln('<td width=20%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Certificate Profile Set Id:</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln(profileSetId);
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('<table border=1 width=100%>');
document.writeln('<tr>');
document.writeln('<td width=10%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>#</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td width=45%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Extensions / Fields</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('<td width=45%>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
document.writeln('<b>Constraints</b>');
document.writeln('</FONT>');
document.writeln('</td>');
document.writeln('</tr>');
for (var i = 0; i < recordSet.length; i++) {
  document.writeln('<tr valign=top>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(recordSet[i].policyId);
document.writeln('</FONT>');
  document.writeln('</td>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(recordSet[i].defDesc);
document.writeln('</FONT>');
  document.writeln('<p>');
  document.writeln('<table width=100%>');
  for (var j = 0; j < recordSet[i].defListSet.length; j++) {
    document.writeln('<tr valign=top>');
    if (typeof(recordSet[i].defListSet[j].defName) != 'undefined') {
      document.writeln('<td width=30%><i>');
      document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
      document.writeln(recordSet[i].defListSet[j].defName + ':');
      document.writeln('</FONT>');
      document.writeln('</i></td>');
      document.writeln('<td width=70%>');
      if (recordSet[i].defListSet[j].defConstraint == 'readonly') {
          document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
          document.writeln(recordSet[i].defListSet[j].defVal);
          document.writeln('</FONT>');
      } else {
        if (recordSet[i].defListSet[j].defSyntax == 'string') {
          document.writeln('<input size=32 type=text name="' + recordSet[i].defListSet[j].defId + '" value="' + escapeValue(recordSet[i].defListSet[j].defVal) + '">');
        } else if (recordSet[i].defListSet[j].defSyntax == 'string_list') {
          document.writeln('<textarea cols=40 rows=5 name="' + recordSet[i].defListSet[j].defId + '">' + recordSet[i].defListSet[j].defVal + '</textarea>');
        } else if (recordSet[i].defListSet[j].defSyntax == 'integer') {
          document.writeln('<input size=6 type=text name="' + recordSet[i].defListSet[j].defId + '" value="' + recordSet[i].defListSet[j].defVal + '">');
        } else if (recordSet[i].defListSet[j].defSyntax == 'image_url') {
          document.writeln('<img border=0 src="' + recordSet[i].defListSet[j].defVal + '">');
          document.writeln('<input type=hidden name="' + recordSet[i].defListSet[j].defId + '" value="' + recordSet[i].defListSet[j].defVal + '">');
        } else if (recordSet[i].defListSet[j].defSyntax == 'choice') {
          document.writeln('<select name="' + recordSet[i].defListSet[j].defId + '">');
	  var c = recordSet[i].defListSet[j].defConstraint.split(',');
          for(var k = 0; k < c.length; k++) {
            if (recordSet[i].defListSet[j].defVal == c[k]) {
              document.writeln('<option selected value=' + c[k] + '>');
	    } else { 
              document.writeln('<option value=' + c[k] + '>');
            }
            document.writeln(c[k]);
            document.writeln('</option>');
          }

          document.writeln('</select>');
        } else if (recordSet[i].defListSet[j].defSyntax == 'boolean') {
          document.writeln('<select name="' + recordSet[i].defListSet[j].defId + '">');
          if (recordSet[i].defListSet[j].defVal == 'true') {
            document.writeln('<option selected value=true>true</option>');
            document.writeln('<option value=false>false</option>');
          } else {
            document.writeln('<option value=true>true</option>');
            document.writeln('<option selected value=false>false</option>');
          }
          document.writeln('</select>');
        }
      }
      document.writeln('</td>');
    }
    document.writeln('</tr>');
  }
  document.writeln('</table>');
  document.writeln('</td>');
  document.writeln('<td>');
document.writeln('<FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">');
  document.writeln(recordSet[i].conDesc);
document.writeln('</FONT>');
  document.writeln('</td>');
  document.writeln('</tr>');
} // for
document.writeln('</table>'); 
document.writeln('<p>');
document.writeln('<TABLE width=100%><TR><TD valign="top" align="left" colspan="3" bgcolor="#e5e5e5"><FONT size="-1" face="PrimaSans BT, Verdana, sans-serif">Additional Notes</FONT></TD></TR></TABLE>');
document.writeln('<textarea cols=40 rows=5 name="requestNotes">' + requestNotes + '</textarea>');
document.writeln('<p>');
     document.writeln('<SELECT NAME="op">');
     document.writeln('<OPTION VALUE="update">Update request</OPTION>');
     document.writeln('<OPTION VALUE="validate">Validate request</OPTION>');
     document.writeln('<OPTION SELECTED VALUE="approve">Approve request</OPTION>');
     document.writeln('<OPTION VALUE="reject">Reject request</OPTION>');
     document.writeln('<OPTION VALUE="cancel">Cancel request</OPTION>');
     document.writeln('<OPTION VALUE="assign">Assign request</OPTION>');
     document.writeln('<OPTION VALUE="unassign">Unassign request</OPTION>');
     document.writeln('</SELECT>');
if (typeof(nonce) != "undefined") {
     document.writeln("<INPUT TYPE=hidden name=nonce value=\"" + nonce +"\">");
}
document.writeln('<input type=submit name=submit value=submit>');
document.writeln('</form>');
} // if
</script>
</html>