diff --git a/opensrp-chw/src/lmh/java/org/smartregister/chw/application/ChwApplicationFlv.java b/opensrp-chw/src/lmh/java/org/smartregister/chw/application/ChwApplicationFlv.java index 3a9725d5e3..595e80dfbd 100644 --- a/opensrp-chw/src/lmh/java/org/smartregister/chw/application/ChwApplicationFlv.java +++ b/opensrp-chw/src/lmh/java/org/smartregister/chw/application/ChwApplicationFlv.java @@ -200,4 +200,9 @@ public boolean onFamilySaveGoToProfile() { public boolean onChildProfileHomeGoToChildRegister() { return false; } + + @Override + public boolean greyOutFormActionsIfInvalid() { + return true; + } } diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/activity/FamilyRegisterActivity.java b/opensrp-chw/src/main/java/org/smartregister/chw/activity/FamilyRegisterActivity.java index 94ce107a89..bc1d1a334d 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/activity/FamilyRegisterActivity.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/activity/FamilyRegisterActivity.java @@ -79,7 +79,10 @@ public Form getFormConfig() { currentConfig.setHideNextButton(true); currentConfig.setNextLabel(getString(R.string.next)); currentConfig.setShowNextInToolbarWhenWizard(true); + + currentConfig.setGreyOutSaveWhenFormInvalid(true); } + currentConfig.setGreyOutSaveWhenFormInvalid(ChwApplication.getApplicationFlavor().greyOutFormActionsIfInvalid()); return currentConfig; } } \ No newline at end of file diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java index 1548749728..f2bd125b76 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/application/ChwApplication.java @@ -459,6 +459,8 @@ public interface Flavor { boolean onChildProfileHomeGoToChildRegister(); + boolean greyOutFormActionsIfInvalid(); + } } diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/application/DefaultChwApplicationFlv.java b/opensrp-chw/src/main/java/org/smartregister/chw/application/DefaultChwApplicationFlv.java index f7bd0c6681..cea4ee628f 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/application/DefaultChwApplicationFlv.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/application/DefaultChwApplicationFlv.java @@ -258,4 +258,9 @@ public boolean onFamilySaveGoToProfile() { public boolean onChildProfileHomeGoToChildRegister() { return true; } + + @Override + public boolean greyOutFormActionsIfInvalid() { + return false; + } }