@@ -19,6 +19,9 @@ function($parse, $compile, $http, $templateCache){
1919 if ( form . type === 'checkbox' ) {
2020 return 'directives/decorators/bootstrap/checkbox.html' ;
2121 }
22+ if ( form . type === 'checkboxes' ) {
23+ return 'directives/decorators/bootstrap/checkboxes.html' ;
24+ }
2225 if ( form . type === 'number' ) {
2326 return 'directives/decorators/bootstrap/default.html' ;
2427 }
@@ -46,7 +49,7 @@ function($parse, $compile, $http, $templateCache){
4649 //We do this manually since we need to bind ng-model properly and also
4750 //for fieldsets to recurse properly.
4851 $http . get ( templateUrl ( form ) , { cache : $templateCache } ) . then ( function ( res ) {
49- var template = res . data . replace ( '$ $value$$' , 'model.' + form . key ) ;
52+ var template = res . data . replace ( / \$ \ $v a l u e \$ \$ / g , 'model.' + form . key ) ;
5053 $compile ( template ) ( scope , function ( clone ) {
5154 element . replaceWith ( clone ) ;
5255 } ) ;
@@ -58,6 +61,16 @@ function($parse, $compile, $http, $templateCache){
5861 scope . showTitle = function ( ) {
5962 return scope . form && scope . form . notitle !== true && scope . form . title ;
6063 } ;
64+
65+ scope . checkboxValuesToList = function ( values ) {
66+ var lst = [ ] ;
67+ angular . forEach ( values , function ( v , k ) {
68+ if ( v ) {
69+ lst . push ( k ) ;
70+ }
71+ } ) ;
72+ return lst ;
73+ } ;
6174 }
6275 } ;
6376} ] ) ;
0 commit comments