diff --git a/api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryConstants.java b/api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryConstants.java
index 339e64db7..c11d313bf 100644
--- a/api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryConstants.java
+++ b/api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryConstants.java
@@ -36,6 +36,8 @@ public class HtmlFormEntryConstants {
public static final String GP_RESTRICT_ENCOUNTER_LOCATION_TO_CURRENT_VISIT_LOCATION = "htmlformentry.restrictEncounterLocationToCurrentVisitLocation";
+ public static final String GP_TIME_WIDGET_HIDE_SECONDS_DEFAULT = "htmlformentry.timeWidgetHideSecondsDefault";
+
public final static String GP_TIMEZONE_CONVERSIONS = "timezone.conversions";
public static final String COMPLEX_UUID = "8d4a6242-c2cc-11de-8d13-0010c6dffd0f";
diff --git a/api/src/main/java/org/openmrs/module/htmlformentry/widget/TimeWidget.java b/api/src/main/java/org/openmrs/module/htmlformentry/widget/TimeWidget.java
index c861e625f..a825cb313 100644
--- a/api/src/main/java/org/openmrs/module/htmlformentry/widget/TimeWidget.java
+++ b/api/src/main/java/org/openmrs/module/htmlformentry/widget/TimeWidget.java
@@ -25,12 +25,13 @@ public class TimeWidget implements Widget {
private boolean hidden;
- private boolean hideSeconds = false;
+ private boolean hideSeconds;
private String timeFormat;
public TimeWidget() {
-
+ hideSeconds = "true".equalsIgnoreCase(Context.getAdministrationService()
+ .getGlobalProperty(HtmlFormEntryConstants.GP_TIME_WIDGET_HIDE_SECONDS_DEFAULT, "false"));
}
private SimpleDateFormat timeFormat() {
diff --git a/omod/src/main/resources/config.xml b/omod/src/main/resources/config.xml
index 678e0a88d..7074847cd 100644
--- a/omod/src/main/resources/config.xml
+++ b/omod/src/main/resources/config.xml
@@ -97,6 +97,11 @@
false
When set to true and an encounter is being entered in the context of a visit, the encounter location will be restricted to the current visit location (and it's descendents)
+
+ htmlformentry.timeWidgetHideSecondsDefault
+ false
+ When rendering the time widget, whether to hide the seconds widget by default
+
//TODO this GP should be removed once the timezone.conversions GP is provided by Core.