Skip to content

Commit 2187954

Browse files
committed
make login page a little smaller
1 parent b02a9a7 commit 2187954

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

OpenFlow/src/public/PassiveLogin.html

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,24 @@
5454
if (!$scope.$$phase) { $scope.$apply(); }
5555
};
5656
this.jwt = function (error, data) {
57-
console.log(data);
5857
if (data.user) {
5958
this.user = data.user;
6059
} else {
6160
getJSON("/loginproviders", this.process.bind(this));
6261
}
6362
if (!$scope.$$phase) { $scope.$apply(); }
6463
};
64+
this.config = function (error, data) {
65+
console.log(data);
66+
this.allow_user_registration = data.allow_user_registration;
67+
this.allow_user_registration = true;
68+
if (!$scope.$$phase) { $scope.$apply(); }
69+
};
6570

6671
getJSON("/jwt", this.jwt.bind(this));
6772

73+
getJSON("/jwt", this.config.bind(this));
74+
6875
}
6976
angular.module('controllerExample', [])
7077
.controller('SettingsController2', SettingsController2);
@@ -73,10 +80,10 @@
7380

7481
<body ng-app="controllerExample">
7582

76-
<div class="starter-template" ng-controller="SettingsController2 as ctrl">
83+
<div ng-controller="SettingsController2 as ctrl">
7784
<div class="row" ng-show="ctrl.user == null">
7885
<div class="col-sm-9 col-md-7 col-lg-5 mx-auto">
79-
<div class="card card-signin my-5">
86+
<div class="card card-signin my-2">
8087
<div class="card-body">
8188
<h5 class="card-title text-center"><span translate lib="web">signin</span> {{ctrl.domain}}</h5>
8289
</h5>
@@ -91,16 +98,13 @@ <h5 class="card-title text-center"><span translate lib="web">signin</span> {{ctr
9198
placeholder="Password" required autocomplete="current-password">
9299
<label for="password" translate lib="web">password</label>
93100
</div>
94-
<div class="mb-3">
95-
<label class="text-danger" translate lib="web" ng-model="ctrl.message"></label>
96-
</div>
97101
<button class="btn btn-lg btn-primary btn-block text-uppercase" type="submit" ng-show="ctrl.localenabled"
98102
translate lib="web">signin</button>
99103
<hr class="my-4" ng-show="ctrl.localenabled">
100104

101105
<a ng-href="/{{model.id}}" ng-repeat="model in ctrl.providers track by $index"
102106
class="btn btn-lg btn-block text-uppercase">
103-
<i class="fab {{model.logo}} mr-2"></i><span translate lib="web">{{model.name}}</span>
107+
<i class="fab {{model.logo}}"></i><span translate lib="web">{{model.name}}</span>
104108
</a>
105109

106110
<div class="card-body" ng-show="ctrl.allow_user_registration==true">

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.346
1+
0.0.347

0 commit comments

Comments
 (0)