diff --git a/public/app/controllers/all.js b/public/app/controllers/all.js index f735963e886..99b9a496484 100644 --- a/public/app/controllers/all.js +++ b/public/app/controllers/all.js @@ -6,6 +6,7 @@ define([ './inspectCtrl', './jsonEditorCtrl', './loginCtrl', + './resetPasswordCtrl', './sidemenuCtrl', './errorCtrl', ], function () {}); diff --git a/public/app/controllers/resetPasswordCtrl.js b/public/app/controllers/resetPasswordCtrl.js new file mode 100644 index 00000000000..385a52320d1 --- /dev/null +++ b/public/app/controllers/resetPasswordCtrl.js @@ -0,0 +1,28 @@ +define([ + 'angular', + 'app', + 'lodash' +], +function (angular, app, _) { + 'use strict'; + + var module = angular.module('grafana.controllers'); + + module.controller('ResetPasswordCtrl', function($scope, contextSrv, backendSrv) { + + contextSrv.sidemenu = false; + $scope.sendMode = true; + $scope.formModel = {}; + + $scope.sendResetEmail = function() { + if (!$scope.loginForm.$valid) { + return; + } + + backendSrv.post('/api/user/password/send-reset-email', $scope.formModel).then(function() { + }); + }; + + }); + +}); diff --git a/public/app/partials/login.html b/public/app/partials/login.html index 437588dd652..ded98e6bd67 100644 --- a/public/app/partials/login.html +++ b/public/app/partials/login.html @@ -91,7 +91,15 @@ -