[Frontend] Form and form control enhancements

WTD-1002
Added Angular hooks to allow form elements to have JSON defined CSS classes
Form element cleanups
This commit is contained in:
Charles Hacskaylo
2015-03-10 22:36:35 -07:00
parent 68c3ec7194
commit cc181dbdc9
12 changed files with 152 additions and 98 deletions

View File

@@ -1,6 +1,6 @@
<span ng-controller="CompositeController as compositeCtrl">
<ng-form name="mctFormItem" ng-repeat="item in structure.items">
<div class="l-composite-control l-{{item.control}}">
<div class="l-composite-control l-{{item.control}} {{item.cssclass}}">
<mct-control key="item.control"
ng-model="ngModel[field]"
ng-required="ngRequired || compositeCtrl.isNonEmpty(ngModel[field])"

View File

@@ -1,5 +1,5 @@
<span class='form-control shell'>
<span class='field control'>
<span class='field control {{structure.cssclass}}'>
<input type="text"
ng-required="ngRequired"
ng-model="ngModel[field]"