Skip to content

Commit

Permalink
Merge pull request #9114 from GilbertCherrie/fix_action_form_tag_bug
Browse files Browse the repository at this point in the history
Fix action form tag bug
  • Loading branch information
jeffibm authored Mar 13, 2024
2 parents 39db732 + ce7128c commit 5b640df
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/javascript/components/action-form/action-form.schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ function createSchema(recordId, promise, inheritTags, evaluateAlert, tags, ansib
id: 'options.tags',
name: 'options.tags',
label: __('Tag to Apply'),
isRequired: true,
validate: [{ type: validatorTypes.REQUIRED }],
options: buildTags(tags, inheritTags),
},
],
Expand Down
2 changes: 1 addition & 1 deletion app/javascript/components/action-form/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ const findLabel = (inheritTags, catLabel) => {

const buildTags = (tags, inheritTags) => {
const entry = Object.entries(tags);
const tagArray = [];
const tagArray = [{ label: __('<Choose>'), value: '' }];
entry.forEach((pt) => {
const catOptions = [];
const tempObj = { label: pt[0], value: pt[1] };
Expand Down
Loading

0 comments on commit 5b640df

Please sign in to comment.