Permalink
Browse files

fix(labels): hides the labels when element.label is set to false

  • Loading branch information...
bas080
bas080 committed Jun 8, 2016
1 parent 7f8e1b9 commit 8ca0df87f9eb2abcc0068968972672c4e7750250
Showing with 11 additions and 7 deletions.
  1. +1 −1 src/frameworks/bootstrap/form-group.html
  2. +10 −6 src/frameworks/form-group.js
@@ -6,7 +6,7 @@
<label
class="controle-label"
t.bind="attribute.key || attribute.label"
if.bind="attribute.label !== false">${attribute.key || attribute.label}</label>
if.bind="showsLabel">${attribute.key || attribute.label}</label>
<content></content>
<span class="help-block">${message}</span>
</div>
@@ -1,17 +1,21 @@
import {bindable, inject} from 'aurelia-framework';

import {bindable, inject, computedFrom} from 'aurelia-framework';

@inject(Element)
export class FormGroup {

constructor(element) {
this.element = element;
}

@bindable
attribute

@bindable
message

constructor(element) {
this.element = element;
}

@computedFrom('message')
get showsLabel() {
return (this.message !== false);
}

}

0 comments on commit 8ca0df8

Please sign in to comment.