Skip to content

Commit e87dba2

Browse files
committed
Merge pull request #31 from mangei/MG/i18nSupportForCatInputGroup
Added support for i18n in cat-input-group directive
2 parents 5f3f3b8 + d8648be commit e87dba2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/javascript/directives/cat-inputs.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ angular.module('cat.directives.inputs', [])
3434
transclude: true,
3535
scope: {
3636
label: '@',
37-
name: '@'
37+
name: '@',
38+
labelI18n: '@'
3839
},
3940
link: function CatInputGroupLink(scope, element) {
4041
element.addClass('form-group');
4142
},
4243
templateUrl: 'template/cat-input.tpl.html'
4344
};
44-
});
45+
});

src/main/resources/template/cat-input.tpl.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<label class="col-sm-2 control-label" for="{{name}}">{{label}}</label>
1+
<label class="col-sm-2 control-label" for="{{name}}" cat-i18n="{{labelI18n}}">{{label}}</label>
22
<div class="col-sm-10">
33
<div ng-transclude class="cat-input"></div>
44
<cat-field-errors errors="errors" name="{{name}}"></cat-field-errors>

0 commit comments

Comments
 (0)