Skip to content

Commit

Permalink
fix: πŸ› Fix prefilling collections in BBMRI collections form
Browse files Browse the repository at this point in the history
Change name of the form item it tries to prefill.
  • Loading branch information
dBucik committed Nov 23, 2022
1 parent 6b09399 commit 0976a68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private PerunFormItem generatePerunFormItem(ApplicationFormItemData data) {
// FIXME - hack for BBMRI collections to pre-fill value from URL
if ((data.getValue() == null || data.getValue().isEmpty() || data.getValue().equals("null")) &&
(data.getPrefilledValue() == null || data.getPrefilledValue().isEmpty() || data.getPrefilledValue().equals("null")) &&
data.getFormItem().getShortname().equals("Comma or new-line separated list of IDs of collections you are representing:")) {
data.getFormItem().getShortname().equals("collectionIds")) {
final String bbmriCollections = Window.Location.getParameter("col");
data.setPrefilledValue((bbmriCollections != null) ? JsUtils.unzipString(JsUtils.decodeBase64UrlSafe(bbmriCollections)) : null);
}
Expand Down

0 comments on commit 0976a68

Please sign in to comment.