Skip to content

Commit 65739ba

Browse files
committed
ui
1 parent be00ecb commit 65739ba

5 files changed

Lines changed: 8 additions & 3 deletions

File tree

assets/js/app/core/auth/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="row page-login">
22
<div class="col-md-12">
33

4-
<div class="login-form-container ">
4+
<div class="login-form-container">
55

66
<div class="panel panel-default no-margin">
77
<div class="panel-heading">

assets/js/app/core/auth/login/login.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<form name="loginForm" method="post" novalidate="novalidate">
2-
<br>
32
<div class="form-group"
43
data-show-errors
54
>
@@ -30,7 +29,7 @@
3029
<div class="form-group">
3130
<button class="btn btn-primary btn-block"
3231
data-ng-click="login()"
33-
data-ng-disabled="!loginForm.$valid"
32+
data-ng-disabled="!loginForm.$valid || busy"
3433
>
3534
Login
3635
</button>

assets/js/app/core/auth/login/login.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,18 @@
4343

4444
// Scope function to perform actual login request to server
4545
$scope.login = function login() {
46+
$scope.busy = true;
4647
AuthService
4748
.login($scope.credentials)
4849
.then(
4950
function successCallback() {
51+
$(".login-form-container").hide()
5052
$state.go('dashboard');
53+
$scope.busy = false;
5154
},
5255
function errorCallback(err) {
5356
MessageService.error(err.data.message)
57+
$scope.busy = false;
5458
}
5559
)
5660
;

assets/js/app/core/auth/signup/signup.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
.login(credentials)
6161
.then(
6262
function successCallback() {
63+
$(".login-form-container").hide()
6364
$state.go('dashboard');
6465
},
6566
function errorCallback(err) {

assets/styles/_login.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
margin: auto;
1515
width: 350px;
1616
max-width: 90%;
17+
transition: all 0.5s;
1718

1819
.panel{
1920
.panel-heading{

0 commit comments

Comments
 (0)