tellform/public/modules/forms/admin/directives/configure-form.client.directive.js

38 lines
1.3 KiB
JavaScript
Raw Normal View History

2015-07-03 23:47:14 +00:00
'use strict';
angular.module('forms').directive('configureFormDirective', ['$rootScope', '$filter',
function ($rootScope, $filter) {
2015-07-03 23:47:14 +00:00
return {
2016-05-05 19:12:40 +00:00
templateUrl: 'modules/forms/admin/views/directiveViews/form/configure-form.client.view.html',
2015-08-04 21:06:16 +00:00
restrict: 'E',
scope: {
myform:'='
2015-08-04 21:06:16 +00:00
},
2015-07-03 23:47:14 +00:00
controller: function($scope){
$scope.languages = $rootScope.languages;
2015-07-06 04:29:05 +00:00
$scope.resetForm = $rootScope.resetForm;
$scope.update = $rootScope.update;
2015-07-04 04:57:06 +00:00
$scope.configureTabs = [
{
heading: $filter('translate')('GENERAL_TAB'),
route: 'viewForm.configure.general'
},
{
heading: $filter('translate')('SELF_NOTIFICATIONS_TAB'),
route: 'viewForm.configure.self_notifications'
},
{
heading: $filter('translate')('RESPONDENT_NOTIFICATIONS_TAB'),
route: 'viewForm.configure.respondent_notifications'
}
];
$scope.go = function(route){
$state.go(route);
};
2015-07-03 23:47:14 +00:00
}
};
}
2016-04-29 02:48:02 +00:00
]);