Skip to content

Commit

Permalink
LMH1-73: Allow config for form started in family profile
Browse files Browse the repository at this point in the history
Upgrade native forms to 1.14.5.5.2-TEST-SNAPSHOT
[draft commit] Please edit
  • Loading branch information
LZRS committed Oct 27, 2021
1 parent e18d335 commit b91eda9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion opensrp-chw-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ dependencies {
exclude group: 'xpp3', module: 'xpp3'
}

api('org.smartregister:opensrp-client-native-form:1.14.5.5.1-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-native-form:1.14.5.5.2-TEST-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'com.android.support', module: 'cardview-v7'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.ViewPager;

import com.vijay.jsonwizard.constants.JsonFormConstants;
import com.vijay.jsonwizard.domain.Form;

import org.apache.commons.lang3.StringUtils;
import org.greenrobot.eventbus.EventBus;
import org.json.JSONObject;
Expand Down Expand Up @@ -278,6 +281,23 @@ public void updateHasPhone(boolean hasPhone) {
}
}

public Form getFormConfig(){
Form form = new Form();
form.setActionBarBackground(R.color.family_actionbar);
form.setWizard(false);
return form;
}

@Override
public void startFormActivity(JSONObject jsonForm) {
Intent intent = new Intent(this, Utils.metadata().familyMemberFormActivity);
intent.putExtra(Constants.JSON_FORM_EXTRA.JSON, jsonForm.toString());

intent.putExtra(JsonFormConstants.JSON_FORM_KEY.FORM, getFormConfig());

startActivityForResult(intent, JsonFormUtils.REQUEST_CODE_GET_JSON);
}

@Override
protected void initializePresenter() {
familyBaseEntityId = getIntent().getStringExtra(Constants.INTENT_KEY.FAMILY_BASE_ENTITY_ID);
Expand Down

0 comments on commit b91eda9

Please sign in to comment.