diff options
author | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-07-27 19:05:20 +0000 |
---|---|---|
committer | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-07-27 19:05:20 +0000 |
commit | 85c45437fcf3e07e714d4f2fe775cae73dc06801 (patch) | |
tree | b9bfa7a9f2ecce711e4f50571fe6c310ade7d721 /pki/dogtag/tps-ui | |
parent | 2eb3243de06f1589991da47bfde6271e0d80abe6 (diff) | |
download | pki-85c45437fcf3e07e714d4f2fe775cae73dc06801.tar.gz pki-85c45437fcf3e07e714d4f2fe775cae73dc06801.tar.xz pki-85c45437fcf3e07e714d4f2fe775cae73dc06801.zip |
merge 8.1 -> tip, multiple bugs (dogtag)
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1135 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/dogtag/tps-ui')
3 files changed, 107 insertions, 3 deletions
diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template index 62691261a..46abadf6c 100644 --- a/pki/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template +++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/auditAdmin.template @@ -124,6 +124,26 @@ function doCancel() { document.write("</td>\n"); document.write("</tr>\n"); + document.write("<tr>\n"); + document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n"); + document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+ + "Audit Log Signing Interval (seconds): </font>\n"); + document.write("</td>\n"); + document.write("<td>\n"); + document.write("<input TYPE=TEXT NAME=logSigningInterval VALUE=\"" + signedAuditLogInterval + "\" />"); + document.write("</td>\n"); + document.write("</tr>\n"); + + document.write("<tr>\n"); + document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n"); + document.write("<font face=\"PrimaSans BT, Verdana, sans-serif\" size=\"-1\">"+ + "Audit Log Signing Buffer Size (bytes, minimum 512): </font>\n"); + document.write("</td>\n"); + document.write("<td>\n"); + document.write("<input TYPE=TEXT NAME=logSigningBufferSize VALUE=\"" + signedAuditLogBufferSize + "\" />"); + document.write("</td>\n"); + document.write("</tr>\n"); + var nonselectable_array = signedAuditNonSelectableEvents.split(","); document.write("<tr>\n"); document.write("<td ALIGN=LEFT width=30% bgcolor=#e5e5e5>\n"); diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template index aab1d0322..378c537a5 100644 --- a/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template +++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/doToken.template @@ -155,6 +155,14 @@ function doCancel() { } +function check_transition(state, tlist) { + for (var i=0; i < tlist.length; i++) { + if (state == tlist[i]) { + return true; + } + } + return false; +} if (rc == "0") { document.write("<b>The operation has been successful.</b>"); @@ -294,7 +302,42 @@ if (rc == "0") { document.write("<table BORDER=0 CELLSPACING=2 CELLPADDING=0>\n"); document.write("<tr>\n"); document.write("<td width=60%>\n"); - document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">This token has been physically damaged.</option><option value=\"2\">This token has been permanently lost.</option><option value=\"3\">This token has been temporarily lost.</option><option value=\"4\">This temporarily lost token has been found.</option><option value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option><option value=\"6\">This token has been terminated.</option></select><input type=hidden name=op value=do_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>"); + var transitions = allowed_transitions.split(","); + if (allowed_transitions != "") { + document.write("<form method='get' action='tus'><select name=\"question\">"); + + if (check_transition(1, transitions)) { + document.write("<option value=\"1\" >This token has been physically damaged.</option>"); + } else { + document.write("<option value=\"1\" disabled=true >This token has been physically damaged.</option>"); + } + if (check_transition(2, transitions)) { + document.write("<option value=\"2\">This token has been permanently lost.</option>"); + } else { + document.write("<option value=\"2\" disabled=true >This token has been permanently lost.</option>"); + } + if (check_transition(3, transitions)) { + document.write("<option value=\"3\" >This token has been temporarily lost.</option>"); + } else { + document.write("<option value=\"3\" disabled=true >This token has been temporarily lost.</option>"); + } + if (check_transition(4, transitions)) { + document.write("<option value=\"4\" >This temporarily lost token has been found.</option>"); + } else { + document.write("<option value=\"4\" disabled=true >This temporarily lost token has been found.</option>"); + } + if (check_transition(5, transitions)) { + document.write("<option value=\"5\" >This temporarily lost token cannot be found (becomes permanently lost).</option>"); + } else { + document.write("<option value=\"5\" disabled=true >This temporarily lost token cannot be found (becomes permanently lost).</option>"); + } + if (check_transition(6, transitions)) { + document.write("<option value=\"6\" >This token has been terminated.</option>"); + } else { + document.write("<option value=\"6\" disabled=true >This token has been terminated.</option>"); + } + document.write("</select><input type=hidden name=op value=do_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>"); + } document.write("</td>\n"); document.write("<td width=10%>\n"); document.write("<form method='get' action='tus'><input type=hidden name=op value=revoke><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Revoke\"></form>"); diff --git a/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template b/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template index 0ac1a2a5e..e30365aa6 100644 --- a/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template +++ b/pki/dogtag/tps-ui/shared/docroot/tokendb/show.template @@ -149,6 +149,15 @@ function doSave(form) { } } +function check_transition(state, tlist) { + for (var i=0; i < tlist.length; i++) { + if (state == tlist[i]) { + return true; + } + } + return false; +} + function doCancel() { var uri = ""; if (typeof(uriBase) == "undefined") { @@ -297,8 +306,40 @@ if (typeof(results) == "undefined" || results.length == 0) { document.write("<tr>\n"); document.write("<td width=60%>\n"); - if ((typeof(topLevel) == "undefined") || (topLevel != "operator")) { - document.write("<form method='get' action='tus'><select name=\"question\"><option value=\"1\">This token has been physically damaged.</option><option value=\"2\">This token has been permanently lost.</option><option value=\"3\">This token has been temporarily lost.</option><option value=\"4\">This temporarily lost token has been found.</option><option value=\"5\">This temporarily lost token cannot be found (becomes permanently lost).</option><option value=\"6\">This token has been terminated.</option></select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>"); + if ((allowed_transitions != "") && ((typeof(topLevel) == "undefined") || (topLevel != "operator"))) { + var transitions = allowed_transitions.split(","); + document.write("<form method='get' action='tus'><select name=\"question\">"); + if (check_transition(1, transitions)) { + document.write("<option value=\"1\" >This token has been physically damaged.</option>"); + } else { + document.write("<option value=\"1\" disabled=true >This token has been physically damaged.</option>"); + } + if (check_transition(2, transitions)) { + document.write("<option value=\"2\">This token has been permanently lost.</option>"); + } else { + document.write("<option value=\"2\" disabled=true >This token has been permanently lost.</option>"); + } + if (check_transition(3, transitions)) { + document.write("<option value=\"3\" >This token has been temporarily lost.</option>"); + } else { + document.write("<option value=\"3\" disabled=true >This token has been temporarily lost.</option>"); + } + if (check_transition(4, transitions)) { + document.write("<option value=\"4\" >This temporarily lost token has been found.</option>"); + } else { + document.write("<option value=\"4\" disabled=true >This temporarily lost token has been found.</option>"); + } + if (check_transition(5, transitions)) { + document.write("<option value=\"5\" >This temporarily lost token cannot be found (becomes permanently lost).</option>"); + } else { + document.write("<option value=\"5\" disabled=true >This temporarily lost token cannot be found (becomes permanently lost).</option>"); + } + if (check_transition(6, transitions)) { + document.write("<option value=\"6\" >This token has been terminated.</option>"); + } else { + document.write("<option value=\"6\" disabled=true >This token has been terminated.</option>"); + } + document.write("</select><input type=hidden name=op value=do_confirm_token><input type=hidden name=tid value=" + results[0].cn + "><input TYPE=submit VALUE=\"Go\"></form>"); } document.write("</td>\n"); document.write("<td align=right width=10%>\n"); |