Skip to content

Commit

Permalink
modify section series flag - UI
Browse files Browse the repository at this point in the history
  • Loading branch information
rkrenn committed Feb 29, 2024
1 parent c21114b commit ac0a3ed
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public static void initEcrfFieldDefaultValues(ECRFFieldInVO in, Long trialId, Lo
private boolean bulkAddAuditTrail;
private String oldSection;
private String newSection;
private boolean newSeries;
private String deferredDeleteReason;

public EcrfFieldBean() {
Expand Down Expand Up @@ -215,6 +216,7 @@ protected String changeAction(Long id) {
bulkAddOptional = Settings.getBoolean(SettingCodes.ECRF_FIELD_OPTIONAL_PRESET, Bundle.SETTINGS, DefaultSettings.ECRF_FIELD_OPTIONAL_PRESET);
bulkAddSeries = Settings.getBoolean(SettingCodes.ECRF_FIELD_SERIES_PRESET, Bundle.SETTINGS, DefaultSettings.ECRF_FIELD_SERIES_PRESET);
bulkAddAuditTrail = Settings.getBoolean(SettingCodes.ECRF_FIELD_AUDIT_TRAIL_PRESET, Bundle.SETTINGS, DefaultSettings.ECRF_FIELD_AUDIT_TRAIL_PRESET);
newSeries = Settings.getBoolean(SettingCodes.ECRF_FIELD_SERIES_PRESET, Bundle.SETTINGS, DefaultSettings.ECRF_FIELD_SERIES_PRESET);
initIn();
initSets();
return CHANGE_OUTCOME;
Expand Down Expand Up @@ -481,6 +483,14 @@ public boolean isBulkAddSeries() {
return bulkAddSeries;
}

public boolean isNewSeries() {
return newSeries;
}

public void setNewSeries(boolean newSeries) {
this.newSeries = newSeries;
}

@Override
public boolean isCreateable() {
return ((in.getTrialId() == null || in.getEcrfId() == null) ? false : !WebUtil.isTrialLocked(trial));
Expand Down Expand Up @@ -717,7 +727,7 @@ public String updateSectionsAction() {
Messages.addLocalizedMessageClientId("updateSectionsMessages", FacesMessage.SEVERITY_ERROR, MessageCodes.UPDATE_ECRF_FIELD_SECTIONS_NEW_SECTION_REQUIRED);
} else {
Collection<ECRFFieldOutVO> ecrfFields = WebUtil.getServiceLocator().getTrialService()
.updateEcrfFieldSections(WebUtil.getAuthentication(), ecrfId, oldSection, newSection);
.updateEcrfFieldSections(WebUtil.getAuthentication(), ecrfId, oldSection, newSection, newSeries);
boolean initialized;
if (ecrfFields.size() > 0) {
initialized = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,9 @@ update_ecrf_sections_new_section_label=New section*:
update_ecrf_sections_new_section=New section
update_ecrf_sections_new_section_tooltip=Specify the eCRF fields' new section.

update_ecrf_sections_new_series_label=Series:
update_ecrf_sections_new_series_tooltip=Specify if the section is a repeatable group.

ecrffield_section_label=Section*:
ecrffield_section=Section
ecrffield_section_tooltip=The section groups eCRF fields.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,9 @@ update_ecrf_sections_new_section_label=Neuer Abschnitt*:
update_ecrf_sections_new_section=Neuer Abschnitt
update_ecrf_sections_new_section_tooltip=Geben Sie den neuen Abschnitt zu \u00E4ndernder eCRF Felder an.

update_ecrf_sections_new_series_label=Serie:
update_ecrf_sections_new_series_tooltip=Geben Sie an, ob der Abschnitt mehrfach eingeben werden kann.

ecrffield_section_label=Abschnitt*:
ecrffield_section=Abschnitt
ecrffield_section_tooltip=Der Abschnitt gruppiert einzelne eCRF Eingabefelder.
Expand Down
17 changes: 17 additions & 0 deletions web/src/main/webapp/META-INF/includes/trial/ecrfField.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,23 @@
</p:tooltip>
</h:panelGroup>
<p:message for="bulkUpdateNewSection" />

<h:outputLabel for="bulkUpdateNewSeries"
value="#{triallabels.update_ecrf_sections_new_series_label}" />
<h:panelGroup>
<p:selectBooleanCheckbox id="bulkUpdateNewSeries"
value="#{ecrfFieldBean.newSeries}">
<p:ajax />
</p:selectBooleanCheckbox>
<p:tooltip rendered="#{enableTooltips}"
for="bulkUpdateNewSeries">
<h:outputText
value="#{triallabels.update_ecrf_sections_new_series_tooltip}"
escape="false" />
</p:tooltip>
</h:panelGroup>
<p:message for="bulkUpdateNewSeries" />

</h:panelGrid>
<p:messages for="updateSectionsMessages" />
<p:toolbar>
Expand Down

0 comments on commit ac0a3ed

Please sign in to comment.