Skip to content

Commit

Permalink
LMH1-73: grey out form next/save when form fields missing
Browse files Browse the repository at this point in the history
  • Loading branch information
LZRS committed Oct 27, 2021
1 parent f18a895 commit a86c3cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,9 @@ public boolean onFamilySaveGoToProfile() {
public boolean onChildProfileHomeGoToChildRegister() {
return false;
}

@Override
public boolean greyOutFormActionsIfInvalid() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ public interface Flavor {

boolean onChildProfileHomeGoToChildRegister();

boolean greyOutFormActionsIfInvalid();

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,9 @@ public boolean onFamilySaveGoToProfile() {
public boolean onChildProfileHomeGoToChildRegister() {
return true;
}

@Override
public boolean greyOutFormActionsIfInvalid() {
return false;
}
}

0 comments on commit a86c3cb

Please sign in to comment.