From f944641c33145c6d0999af6d6b91a4dca6c4be23 Mon Sep 17 00:00:00 2001 From: Andrew Wnuk Date: Thu, 20 Sep 2012 10:35:59 -0700 Subject: time based searches This patch removes "fixed" year from time based searches for agent and EE interfaces. It also unifies time selection between search and revocation templates. Bug 854420. --- .../webapps/ca/ee/ca/reasonToRevoke.template | 38 +++-- dogtag/ca-ui/shared/webapps/ca/ee/ca/srchCert.html | 184 +++++---------------- 2 files changed, 68 insertions(+), 154 deletions(-) (limited to 'dogtag/ca-ui/shared/webapps/ca/ee/ca') diff --git a/dogtag/ca-ui/shared/webapps/ca/ee/ca/reasonToRevoke.template b/dogtag/ca-ui/shared/webapps/ca/ee/ca/reasonToRevoke.template index 6d2edf1ec..b8b161a93 100644 --- a/dogtag/ca-ui/shared/webapps/ca/ee/ca/reasonToRevoke.template +++ b/dogtag/ca-ui/shared/webapps/ca/ee/ca/reasonToRevoke.template @@ -33,7 +33,7 @@ function validate() var filter = "(|"; var n = 0; - if (!dateIsEmpty(document.forms[0])) { + if (document.forms[0].invalidityEnabled.checked) { var d = convertDate(document.forms[0], "Invalidity Date"); if (d == null) return false; document.forms[0].invalidityDate.value = d; @@ -77,6 +77,26 @@ function validate() return true; } +function clickedOnInvalidityEnabled() +{ + if (document.forms[0].invalidityEnabled.checked) { + var date = new Date(); + if (document.forms[0].day.options[document.forms[0].day.selectedIndex].value == 0) { + document.forms[0].day.selectedIndex = date.getDate(); + } + if (document.forms[0].month.options[document.forms[0].month.selectedIndex].value == 13) { + document.forms[0].month.selectedIndex = date.getMonth() +1; + } + if (document.forms[0].year.options[document.forms[0].year.selectedIndex].value == 0) { + for (var i = 0; i < document.forms[0].year.options.length; i++) { + if (document.forms[0].year.options[i].value == date.getFullYear()) { + document.forms[0].year.selectedIndex = i; + } + } + } + } +} + function toHex1(number) { var absValue = "", sign = ""; @@ -283,6 +303,7 @@ if (result.recordSet.length == 0) { + Invalidity date:  diff --git a/dogtag/ca-ui/shared/webapps/ca/ee/ca/srchCert.html b/dogtag/ca-ui/shared/webapps/ca/ee/ca/srchCert.html index a1ef5657c..2a4b3a9c9 100644 --- a/dogtag/ca-ui/shared/webapps/ca/ee/ca/srchCert.html +++ b/dogtag/ca-ui/shared/webapps/ca/ee/ca/srchCert.html @@ -345,7 +345,7 @@ Show certificates revoked by:
- + @@ -411,23 +411,11 @@ Show certificates revoked during the period:
@@ -490,23 +478,11 @@ Show certificates revoked during the period: