Commit 4ac60d56221343a6b8fcf14d7e06913d8e0fa05d
1 parent
f2b6e24c9e
Exists in
master
disable guardar si no ingresa contraseña
Showing
2 changed files
with
9 additions
and
5 deletions
 
Show diff stats
src/js/controller.js
| ... | ... | @@ -10,7 +10,7 @@ angular.module('focaModalLogin') | 
| 10 | 10 | $scope.usuario = { | 
| 11 | 11 | login: '', | 
| 12 | 12 | pass: '' | 
| 13 | - } | |
| 13 | + }; | |
| 14 | 14 | |
| 15 | 15 | if (parametros.tipo == 'Transportistas') { | 
| 16 | 16 | $scope.usuario.login = parametros.cuenta.dni; | 
| ... | ... | @@ -41,10 +41,10 @@ angular.module('focaModalLogin') | 
| 41 | 41 | focaModalLoginService.postLogin(result).then(function(data) { | 
| 42 | 42 | $uibModalInstance.close(data); | 
| 43 | 43 | }); | 
| 44 | - } | |
| 44 | + }; | |
| 45 | 45 | |
| 46 | 46 | $scope.cancel = function() { | 
| 47 | 47 | $uibModalInstance.dismiss(); | 
| 48 | - } | |
| 48 | + }; | |
| 49 | 49 | } | 
| 50 | - ]); | |
| 51 | 50 | \ No newline at end of file | 
| 51 | + ]); | 
src/views/modal-login.html
| ... | ... | @@ -36,5 +36,9 @@ | 
| 36 | 36 | </div> | 
| 37 | 37 | <div class="modal-footer py-1"> | 
| 38 | 38 | <button class="btn btn-sm btn-secondary" type="button" ng-click="cancel()">Cancelar</button> | 
| 39 | - <button class="btn btn-sm btn-primary" type="button" ng-click="guardar()">Guardar</button> | |
| 39 | + <button | |
| 40 | + class="btn btn-sm btn-primary" | |
| 41 | + type="button" | |
| 42 | + ng-click="guardar()" | |
| 43 | + ng-disabled="!usuario.pass.length">Guardar</button> | |
| 40 | 44 | </div> |