Skip to content

Commit fa054c2

Browse files
committed
Provide several more terms-of-use re-acceptance options
1 parent 685da1b commit fa054c2

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

core/src/org/labkey/core/admin/customizeSite.jsp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<%@ page import="java.util.Map" %>
3535
<%@ page import="java.util.Objects" %>
3636
<%@ page import="java.util.TreeMap" %>
37+
<%@ page import="java.util.stream.Stream" %>
3738
<%@ page import="static org.labkey.api.security.SecurityManager.SECONDS_PER_DAY" %>
3839
<%@ page import="static org.labkey.api.util.ExceptionReportingLevel.*" %>
3940
<%@ page import="static org.labkey.api.settings.SiteSettingsProperties.*" %>
@@ -392,8 +393,8 @@ Click the Save button at any time to accept the current settings and continue.</
392393
if (appProps.isDevMode())
393394
termsFrequencyOptions.put(60, "Once a minute"); // For testing
394395
termsFrequencyOptions.put(SECONDS_PER_DAY, "Once a day");
395-
termsFrequencyOptions.put(7 * SECONDS_PER_DAY, "Every 7 days");
396-
termsFrequencyOptions.put(30 * SECONDS_PER_DAY, "Every 30 days");
396+
Stream.of(7, 30, 90, 180, 365)
397+
.forEach(days -> termsFrequencyOptions.put(days * SECONDS_PER_DAY, "Every " + days + " days"));
397398
398399
// If current value is non-standard (perhaps set by a startup property) then add it, formatting label as a duration
399400
if (!termsFrequencyOptions.containsKey(currentTermsFrequency))

0 commit comments

Comments
 (0)