Support localized html label

This commit is contained in:
loganhz 2017-12-27 12:28:19 +08:00
parent bc26b2c579
commit 333c49980e
4 changed files with 10 additions and 4 deletions

View File

@ -17,6 +17,7 @@ export default Component.extend({
value: null, value: null,
localizedPrompt: false, localizedPrompt: false,
localizedLabel: false, localizedLabel: false,
localizedHtmlLabel: false,
disabled: false, disabled: false,
attributeBindings: ['disabled'], attributeBindings: ['disabled'],

View File

@ -12,6 +12,8 @@
<option value="{{get item optionValuePath}}" selected={{eq value (get item optionValuePath)}} disabled={{get item optionDisabledPath}}> <option value="{{get item optionValuePath}}" selected={{eq value (get item optionValuePath)}} disabled={{get item optionDisabledPath}}>
{{#if localizedLabel}} {{#if localizedLabel}}
{{t (get item optionLabelPath)}} {{t (get item optionLabelPath)}}
{{else if localizedHtmlLabel}}
{{t (get item optionLabelPath) htmlSafe=true}}
{{else}} {{else}}
{{get item optionLabelPath}} {{get item optionLabelPath}}
{{/if}} {{/if}}

View File

@ -11,7 +11,7 @@
{{new-select {{new-select
class="form-control input-sm" class="form-control input-sm"
content=operatorChoices content=operatorChoices
localizedLabel=true localizedHtmlLabel=true
value=rule.operator value=rule.operator
readOnly=editing readOnly=editing
style="display: inline-block; width: auto;" style="display: inline-block; width: auto;"

View File

@ -2284,11 +2284,14 @@ formScheduling:
preferred: "Prefer Any of:" preferred: "Prefer Any of:"
operator: operator:
lt: '<' lt: '<'
le: '<=' le: |
&le;
eq: '=' eq: '='
ne: '!=' ne: |
&ne;
gt: '>' gt: '>'
ge: '>=' ge: |
&ge;
in: 'in' in: 'in'
notIn: 'not in' notIn: 'not in'
exists: 'exists' exists: 'exists'