mirror of
https://github.com/nextcloud/passman.git
synced 2024-09-20 23:06:24 +08:00
catch saving a credential without label #657
This commit is contained in:
parent
e65e335350
commit
158a223d33
|
@ -314,6 +314,12 @@
|
|||
$scope.storedCredential.custom_fields.push(angular.copy($scope.new_custom_field));
|
||||
}
|
||||
|
||||
if ($scope.storedCredential.label === null || $scope.storedCredential.label.length === 0) {
|
||||
$scope.saving = false;
|
||||
NotificationService.showNotification($translate.instant('error.no.label'), 5000);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.storedCredential.password !== $scope.storedCredential.password_repeat){
|
||||
$scope.saving = false;
|
||||
NotificationService.showNotification($translate.instant('password.do.not.match'), 5000);
|
||||
|
@ -406,4 +412,4 @@
|
|||
$location.path('/vault/' + $routeParams.vault_id);
|
||||
};
|
||||
}]);
|
||||
}());
|
||||
}());
|
||||
|
|
Loading…
Reference in a new issue