Skip to content

Commit

Permalink
yes no as radiobutton #174
Browse files Browse the repository at this point in the history
  • Loading branch information
schefbi committed Aug 22, 2024
1 parent ce264e6 commit 7003284
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions app/routes/list/category/event/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ let dataTypeMappings = {
ShortText: 'string',
Text: 'textarea',
Int: 'number',
YesNo: 'checkbox',
Currency: 'number',
Date: 'date'
Date: 'date',
Yes: 'checkbox'
};

let fileTypeMapping = {
Expand Down Expand Up @@ -74,6 +74,23 @@ function getSubscriptionDetailFields(subscriptionDetails) {
dataType = 'file';
}

if (detail.VssType === 'YesNo'){
dataType = 'dropdown';
detail.ShowAsRadioButtons = true;
let yes = {
Key: "Ja",
Value: getString('yes')
};
let no = {
Key: "Nein",
Value: getString('no')
};
let items = [];
items.push(yes);
items.push(no);
detail.DropdownItems = items;
}

return {
id: detail.VssId,
label: detail.VssDesignation,
Expand Down

0 comments on commit 7003284

Please sign in to comment.