Update models and components for dynamic input list component

This commit is contained in:
gconsidine
2017-05-15 15:22:01 -04:00
parent 15b05e9093
commit 94bb533ac7
17 changed files with 95 additions and 67 deletions
@@ -17,12 +17,14 @@ function atActionController ($state) {
form = _form_;
scope = _scope_;
scope.config = scope.config || {};
scope.config.state = scope.config.state || {};
state = scope.config.state;
scope.form = form.use('action', state);
switch(scope.config.type) {
switch(scope.type) {
case 'cancel':
vm.setCancelDefaults();
break;
@@ -61,7 +63,7 @@ function atAction (pathService) {
controllerAs: 'vm',
link,
scope: {
config: '='
type: '@'
}
};
}
@@ -1,5 +1,5 @@
<button class="btn at-Button{{ fill }}--{{ color }}"
ng-disabled="config.type !== 'cancel' && !form.state.isValid"
ng-disabled="type !== 'cancel' && !form.state.isValid"
ng-class="{ 'at-Button--disabled': form.disabled }" ng-click="action()">
{{::text}}
</button>