diff --git a/public/app/features/org/all.js b/public/app/features/org/all.js index ba51b99369b..d03d270709d 100644 --- a/public/app/features/org/all.js +++ b/public/app/features/org/all.js @@ -3,6 +3,7 @@ define([ './datasourceEditCtrl', './orgUsersCtrl', './newOrgCtrl', + './userInviteCtrl', './orgApiKeysCtrl', './orgDetailsCtrl', ], function () {}); diff --git a/public/app/features/org/orgUsersCtrl.js b/public/app/features/org/orgUsersCtrl.js index d5756b5f025..bc124856bab 100644 --- a/public/app/features/org/orgUsersCtrl.js +++ b/public/app/features/org/orgUsersCtrl.js @@ -39,7 +39,7 @@ function (angular) { $scope.openInviteModal = function() { $scope.appEvent('show-modal', { - src: './app/partials/invite_users.html', + src: './app/features/org/partials/invite.html', modalClass: 'modal-no-header invite-modal', scope: $scope.$new() }); diff --git a/public/app/features/org/partials/invite.html b/public/app/features/org/partials/invite.html new file mode 100644 index 00000000000..53290bd6c30 --- /dev/null +++ b/public/app/features/org/partials/invite.html @@ -0,0 +1,68 @@ + + + diff --git a/public/app/features/org/userInviteCtrl.js b/public/app/features/org/userInviteCtrl.js new file mode 100644 index 00000000000..b93611d6df4 --- /dev/null +++ b/public/app/features/org/userInviteCtrl.js @@ -0,0 +1,33 @@ +define([ + 'angular', + 'lodash', +], +function (angular, _) { + 'use strict'; + + var module = angular.module('grafana.controllers'); + + module.controller('UserInviteCtrl', function($scope) { + + $scope.invites = [ + {name: '', email: '', role: 'Editor'}, + ]; + + $scope.init = function() { + }; + + $scope.addInvite = function() { + $scope.invites.push({name: '', email: '', role: 'Editor'}); + }; + + $scope.removeInvite = function(invite) { + $scope.invites = _.without($scope.invites, invite); + }; + + $scope.sendInvites = function() { + if (!$scope.inviteForm.$valid) { return; } + + $scope.dismiss(); + }; + }); +}); diff --git a/public/app/partials/invite_users.html b/public/app/partials/invite_users.html deleted file mode 100644 index 0299baae403..00000000000 --- a/public/app/partials/invite_users.html +++ /dev/null @@ -1,55 +0,0 @@ - - diff --git a/public/css/less/tightform.less b/public/css/less/tightform.less index 71457a62141..a85e852bcbc 100644 --- a/public/css/less/tightform.less +++ b/public/css/less/tightform.less @@ -165,7 +165,7 @@ select.tight-form-input { margin: 0px; border-radius: 0; height: 36px; - padding: 8px 3px; + padding: 9px 3px; &.last { border-right: none; }