Commit d3c13a1d by Torkel Ödegaard

removed old signup/register view

parent 8ed92124
......@@ -7,6 +7,5 @@ define([
'./inspectCtrl',
'./jsonEditorCtrl',
'./loginCtrl',
'./signUpCtrl',
'./errorCtrl',
], function () {});
define([
'angular',
],
function (angular) {
"use strict";
var module = angular.module('grafana.routes');
module.controller('SignUpCtrl', function($scope, backendSrv, $location) {
$scope.loginModel = {};
$scope.grafana.sidemenu = false;
$scope.register = function() {
delete $scope.registerError;
if (!$scope.loginForm.$valid) { return; }
if ($scope.loginModel.password !== $scope.loginModel.password2) {
$scope.registerError = "Passwords do not match";
return;
}
backendSrv.post('/api/account/signup', $scope.loginModel).then(function() {
$location.path('/login');
});
};
});
});
<div class="container">
<div class="login-box">
<div class="login-box-logo">
<img src="img/logo_transparent_200x75.png">
</div>
<div class="text-center" style="margin-bottom: 50px">
<h3>Account registration</32>
</div>
<form name="loginForm" class="form-horizontal">
<div class="row-fluid">
<div class="span8">
<div class="control-group">
<label class="control-label" for="inputEmail">Email</label>
<div class="controls">
<input type="text" required ng-model="loginModel.email" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" required ng-model="loginModel.password" id="inputPassword" placeholder="Password">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword2">Confirm password</label>
<div class="controls">
<input type="password" required ng-model="loginModel.password2" id="password2" placeholder="Confirm password">
</div>
</div>
</div>
<div class="span4">
<button type="submit" ng-click="register()" class="btn btn-success btn-large">
<i class="fa fa-lock"></i>
Sign up
</button>
</div>
</div>
<div class="alert alert-error" ng-show="loginError">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>Login failed:</strong> {{loginError}}
</div>
</form>
</div>
</div>
......@@ -58,10 +58,6 @@ define([
templateUrl: 'app/partials/login.html',
controller : 'LoginCtrl',
})
.when('/signup', {
templateUrl: 'app/partials/register.html',
controller : 'SignUpCtrl',
})
.when('/dashboard/solo/:id/', {
templateUrl: 'app/partials/solo-panel.html',
controller : 'SoloPanelCtrl',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment