catch saving a credential without label #657

This commit is contained in:
binsky 2021-03-24 21:13:27 +01:00
parent e65e335350
commit 158a223d33

View file

@ -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);
};
}]);
}());
}());