spinning icon when login

parent 5e8dadf3
No preview for this file type
This diff could not be displayed because it is too large.
......@@ -40,6 +40,7 @@ function LoginCtrl(
}
$scope.login = function () {
$scope.submitted = true;
$http
.post(config.backend + '/sup/login', $scope.credentials)
.success(function (data) {
......@@ -69,6 +70,7 @@ function LoginCtrl(
$location.path('/students');
})
.error(function (err) {
$scope.submitted = false;
delete $window.sessionStorage.token;
if (err.search("without students") > 0) {
$translate('no_students_for_user').then(function (translation) {
......
......@@ -2,8 +2,8 @@
<!-- Rejilla 3 elementos de igual ancho -->
<div class="col-md-4">&nbsp;</div>
<div class="col-md-4">
<div class="col-md-4">
<div id="login">
<!-- Logo Pictogram -->
<p class="text-center">
......@@ -27,7 +27,9 @@
<p class="text-center">
<button type="submit" class="btn btn-primary" translate>login</button>
</p>
<p class="text-center">
<i ng-class="{'fa fa-spinner fa-spin fa-2x fa-fw margin-bottom': true, 'disabled': !submitted}"></i>
</p>
<p class="text-center">
<a href="/app/#/signin" translate>create_an_account</a>
</p>
......@@ -37,10 +39,9 @@
</div>
<div class="col-md-4">&nbsp;</div>
</div>
<!-- Fin de row -->
<footer-translate></footer-translate>
......@@ -47,6 +47,12 @@
padding: 8px;
}
/* For hidding spinner preserving space */
.disabled {
visibility: hidden;
cursor: default;
}
/* For span that are links */
.pointer{ cursor: pointer; }
......
......@@ -5,6 +5,7 @@
@import (less) '../app/bower_components/angular-chart.js/dist/angular-chart.css';
@import (less) 'cropper.css';
@import (less) 'main.css';
@import (less) 'font-awesome.min.css';
@import 'forms.less';
@import 'picto-grid.less';
......
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 sign in to comment