Convert boolean strings to actual bool (rancher/rancher#4085)

This commit is contained in:
Vincent Fiduccia 2016-06-16 16:31:26 -07:00
parent 7580fb4e5b
commit b3f2257054
2 changed files with 10 additions and 5 deletions

View File

@ -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);
}
}
});

View File

@ -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: {