mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-08 05:04:04 +08:00
Rename description labels to notes.
In the code .description property is still used. Upon save all html tags will be stripped.
This commit is contained in:
parent
3e1e9368a5
commit
5fb3bb3d57
5 changed files with 13 additions and 6 deletions
|
|
@ -11,8 +11,8 @@
|
|||
*/
|
||||
angular.module('passmanApp')
|
||||
.controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService',
|
||||
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams',
|
||||
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams) {
|
||||
'$rootScope', 'FileService', 'EncryptService', 'TagService', '$timeout', 'NotificationService', 'CacheService', 'ShareService', 'SharingACL', '$interval', '$filter', '$routeParams', '$sce',
|
||||
function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, FileService, EncryptService, TagService, $timeout, NotificationService, CacheService, ShareService, SharingACL, $interval, $filter, $routeParams, $sce) {
|
||||
$scope.active_vault = VaultService.getActiveVault();
|
||||
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
|
||||
if (!$scope.active_vault) {
|
||||
|
|
@ -344,6 +344,7 @@
|
|||
|
||||
$scope.selectedCredential = false;
|
||||
$scope.selectCredential = function (credential) {
|
||||
credential.description_html = $sce.trustAsHtml(angular.copy(credential.description).replace("\n", '<br />'));
|
||||
$scope.selectedCredential = angular.copy(credential);
|
||||
$rootScope.$emit('app_menu', true);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -257,7 +257,8 @@
|
|||
|
||||
delete _credential.shared_key;
|
||||
var _useKey = (key != null);
|
||||
|
||||
var regex = /(<([^>]+)>)/ig;
|
||||
_credential.description = _credential.description.replace(regex, "");
|
||||
CredentialService.updateCredential(_credential, _useKey).then(function (result) {
|
||||
SettingsService.setSetting('edit_credential', null);
|
||||
$location.path('/vault/' + $routeParams.vault_id);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -28,7 +28,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<label>Description</label>
|
||||
<label>Notes</label>
|
||||
<div>
|
||||
<textarea class="credential_textarea" ng-model="storedCredential.description"></textarea>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -123,6 +123,11 @@
|
|||
value="selectedCredential.url"></span></div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="selectedCredential.description">
|
||||
<div class="col-xs-4 col-md-3 col-lg-3">Notes</div>
|
||||
<div class="col-xs-8 col-md-9 col-lg-9" ng-bind-html="selectedCredential.description_html"></div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="selectedCredential.files.length > 0">
|
||||
<div class="col-xs-4 col-md-3 col-lg-3">Files</div>
|
||||
<div class="col-xs-8 col-md-9 col-lg-9"><div ng-repeat="file in selectedCredential.files"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue