/* Controllers */
-function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $route, Organizations, RegistrationState) {
+function RegistrationCtrl($scope, $log, Registration, $routeParams, $location, $route, Organizations, ValidStates) {
$scope.$routeParams = $routeParams;
$scope.$location = $location;
$scope.organizations = data;
$log.info('organizations promise ', $scope.organizations);
});
- $scope.RegistrationState = RegistrationState();
+ $scope.ValidStates = ValidStates();
$scope.info = { message: '', css_class: '' } ; // alert box
$scope.reset();
}
-RegistrationCtrl.$inject = [ '$scope', '$log', 'Registration', '$routeParams', '$location', '$route', 'Organizations', 'RegistrationState' ];
+RegistrationCtrl.$inject = [ '$scope', '$log', 'Registration', '$routeParams', '$location', '$route', 'Organizations', 'ValidStates' ];
-function ListCtrl($scope, $log, Registration, RegistrationTypes, $filter, RegistrationState ) {
+function ListCtrl($scope, $log, Registration, RegistrationTypes, $filter, ValidStates ) {
$scope.list = [];
$scope.list_results = 0;
states: true,
pager_numeric: false
};
- $scope.RegistrationState = RegistrationState();
+ $scope.ValidStates = ValidStates();
$scope.create_counts = function( array ) {
$log.info('create_counts', array.length );
}
}
-ListCtrl.$inject = [ '$scope', '$log', 'Registration', 'RegistrationTypes', '$filter', 'RegistrationState' ];
+ListCtrl.$inject = [ '$scope', '$log', 'Registration', 'RegistrationTypes', '$filter', 'ValidStates' ];
describe('my-label-select', function() {
beforeEach(module('myApp.services'));
it('div+label+input', function() {
- inject(function($compile, $rootScope, RegistrationState) {
- //dump( RegistrationState() );
- var element = $compile('<div><select class="my-label-select" ng-model="m" label="label" ng-options="value for value in RegistrationState()"></select></div>')($rootScope);
+ inject(function($compile, $rootScope, ValidStates) {
+ //dump( ValidStates() );
+ var element = $compile('<div><select class="my-label-select" ng-model="m" label="label" ng-options="value for value in ValidStates()"></select></div>')($rootScope);
//dump(element.html());
expect(element.html()).toMatch(/div.*label.*label.*div.*select.*select.*div.*div/i);
});