Skip to content

Commit bdab2f1

Browse files
committed
Merge pull request #327 from AlexAlbala/development
Added labelHtmlClass
2 parents 63b1764 + 76b421b commit bdab2f1

File tree

9 files changed

+9
-8
lines changed

9 files changed

+9
-8
lines changed

docs/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ General options most field types can handle:
628628
// and their items will inherit it.
629629
htmlClass: "street foobar", // CSS Class(es) to be added to the container div
630630
fieldHtmlClass: "street" // CSS Class(es) to be added to field input (or similar)
631+
labelHtmlClass: "street" // CSS Class(es) to be added to the label of the field (or similar)
631632
copyValueTo: ["address.street"], // Copy values to these schema keys.
632633
condition: "person.age < 18" // Show or hide field depending on an angular expression
633634
}

src/directives/decorators/bootstrap/checkbox.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="checkbox schema-form-checkbox {{form.htmlClass}}"
22
ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
3-
<label>
3+
<label class="{{form.labelHtmlClass}}">
44
<input type="checkbox"
55
sf-changed="form"
66
ng-disabled="form.readonly"

src/directives/decorators/bootstrap/checkboxes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div sf-array="form" ng-model="$$value$$"
22
class="form-group schema-form-checkboxes {{form.htmlClass}}"
33
ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
4-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
4+
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">{{form.title}}</label>
55
<div class="checkbox" ng-repeat="val in titleMapValues track by $index" >
66
<label>
77
<input type="checkbox"

src/directives/decorators/bootstrap/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="form-group schema-form-{{form.type}} {{form.htmlClass}}"
22
ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false }">
3-
<label class="control-label" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label>
3+
<label class="control-label {{form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label>
44

55
<input ng-if="!form.fieldAddonLeft && !form.fieldAddonRight"
66
ng-show="form.key"

src/directives/decorators/bootstrap/radio-buttons.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="form-group schema-form-radiobuttons {{form.htmlClass}}"
22
ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
33
<div>
4-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
4+
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">{{form.title}}</label>
55
</div>
66
<div class="btn-group">
77
<label class="btn {{ (item.value === $$value$$) ? form.style.selected || 'btn-default' : form.style.unselected || 'btn-default'; }}"

src/directives/decorators/bootstrap/radios-inline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="form-group schema-form-radios-inline {{form.htmlClass}}"
22
ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
3-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
3+
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">{{form.title}}</label>
44
<div>
55
<label class="radio-inline" ng-repeat="item in form.titleMap" >
66
<input type="radio"

src/directives/decorators/bootstrap/radios.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="form-group schema-form-radios {{form.htmlClass}}" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
2-
<label class="control-label" ng-show="showTitle()">{{form.title}}</label>
2+
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">{{form.title}}</label>
33
<div class="radio" ng-repeat="item in form.titleMap" >
44
<label>
55
<input type="radio"

src/directives/decorators/bootstrap/select.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="form-group {{form.htmlClass}} schema-form-select"
22
ng-class="{'has-error': hasError(), 'has-success': hasSuccess(), 'has-feedback': form.feedback !== false}">
3-
<label class="control-label" ng-show="showTitle()">
3+
<label class="control-label {{form.labelHtmlClass}}" ng-show="showTitle()">
44
{{form.title}}
55
</label>
66
<select ng-model="$$value$$"

src/directives/decorators/bootstrap/textarea.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="form-group has-feedback {{form.htmlClass}} schema-form-textarea" ng-class="{'has-error': hasError(), 'has-success': hasSuccess()}">
2-
<label ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label>
2+
<label class="{{form.labelHtmlClass}}" ng-class="{'sr-only': !showTitle()}" for="{{form.key.slice(-1)[0]}}">{{form.title}}</label>
33

44
<textarea ng-if="!form.fieldAddonLeft && !form.fieldAddonRight"
55
class="form-control {{form.fieldHtmlClass}}"

0 commit comments

Comments
 (0)