Skip to content

Commit

Permalink
fix-9154: [Badge Wizard] Showing <a> tag in custom field when organiz… (
Browse files Browse the repository at this point in the history
#9157)

* fix-9154: [Badge Wizard] Showing <a> tag in custom field when organizer tries to add custom question to badge

* fix-9154: [Badge Wizard] Showing <a> tag in custom field when organizer tries to add custom question to badge
  • Loading branch information
khangon authored Aug 24, 2023
1 parent 8ef23c3 commit 3447f60
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
12 changes: 12 additions & 0 deletions app/helpers/value-field-link.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { helper } from '@ember/component/helper';
import { htmlSafe } from '@ember/string';

export function valueFieldLink(data) {
let field = '';
if(data){
field = data;
}
return htmlSafe(field);
}

export default helper(valueFieldLink);
8 changes: 4 additions & 4 deletions app/templates/components/forms/wizard/badge-field-form.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<i class="dropdown icon"></i>
{{#if this.data.custom_field}}
<div class="default">
{{t-var this.data.custom_field}}
{{value-field-link (t-var this.data.custom_field)}}
</div>
{{else}}
<div class="default text">
Expand All @@ -55,8 +55,8 @@
</div>
{{else}}
{{#if cfield.isComplex}}
<div class=" item complex-item" data-value="{{cfield.isComplex}}">
{{rich-text-link cfield.isComplex}}
<div class=" item complex-item" data-value="{{value-field-link cfield.isComplex}}">
{{value-field-link cfield.isComplex}}
</div>
{{/if}}
{{/if}}
Expand Down Expand Up @@ -85,7 +85,7 @@
{{#each this.getQrFields as |field|}}
{{#if field}}
<div data-value="{{map-value mapper field.fieldIdentifier}}" class="item">
{{field.name}}
{{value-field-link field.name}}
</div>
{{/if}}
{{/each}}
Expand Down

0 comments on commit 3447f60

Please sign in to comment.