From 04148778d22318e15881718a61f4c9a88186a301 Mon Sep 17 00:00:00 2001 From: Andrew Wnuk Date: Wed, 19 Sep 2012 17:26:30 -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/agent/ca/reasonToRevoke.template | 36 ++++++++++++++-------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'dogtag/ca-ui/shared/webapps/ca/agent/ca/reasonToRevoke.template') diff --git a/dogtag/ca-ui/shared/webapps/ca/agent/ca/reasonToRevoke.template b/dogtag/ca-ui/shared/webapps/ca/agent/ca/reasonToRevoke.template index 12c14dfda..5752d14de 100644 --- a/dogtag/ca-ui/shared/webapps/ca/agent/ca/reasonToRevoke.template +++ b/dogtag/ca-ui/shared/webapps/ca/agent/ca/reasonToRevoke.template @@ -32,7 +32,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; @@ -76,6 +76,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 = ""; @@ -287,6 +307,7 @@ if (result.recordSet.length == 0) { + Invalidity date:  -- cgit