mirror of https://github.com/rancher/ui.git
Convert boolean strings to actual bool (rancher/rancher#4085)
This commit is contained in:
parent
7580fb4e5b
commit
b3f2257054
|
|
@ -2,4 +2,13 @@ import Ember from 'ember';
|
|||
|
||||
export default Ember.Component.extend({
|
||||
classNames: ['form-control-static'],
|
||||
|
||||
didReceiveAttrs() {
|
||||
if ( this.get('value') === 'false' ) {
|
||||
this.set('value', false);
|
||||
}
|
||||
else if ( this.get('value') === 'true' ) {
|
||||
this.set('value', true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
import Ember from 'ember';
|
||||
import Errors from 'ui/utils/errors';
|
||||
|
||||
let UNRESTRICTED = 'unrestricted',
|
||||
RESTRICTED = 'restricted',
|
||||
REQUIRED = 'required';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
tagName: 'section',
|
||||
classNames: ['well'],
|
||||
|
|
@ -18,7 +14,7 @@ export default Ember.Component.extend({
|
|||
errors: null,
|
||||
|
||||
showList: function() {
|
||||
return this.get('copy.accessMode') !== UNRESTRICTED;
|
||||
return this.get('copy.accessMode') !== 'unrestricted';
|
||||
}.property('copy.accessMode'),
|
||||
|
||||
actions: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue