mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-03 10:14:31 +08:00
Add custom fields
This commit is contained in:
parent
d8f26f8b5d
commit
19959b1d0a
11 changed files with 185 additions and 40 deletions
15
css/app.css
15
css/app.css
|
@ -223,6 +223,21 @@
|
||||||
float: left; }
|
float: left; }
|
||||||
.edit_credential .password_settings label .label {
|
.edit_credential .password_settings label .label {
|
||||||
float: left; }
|
float: left; }
|
||||||
|
.edit_credential .password_settings label .label.sm {
|
||||||
|
font-size: 12px; }
|
||||||
|
.edit_credential .custom_fields {
|
||||||
|
margin-top: 10px; }
|
||||||
|
.edit_credential .custom_fields table {
|
||||||
|
width: 100%; }
|
||||||
|
.edit_credential .custom_fields table thead th {
|
||||||
|
background-color: #0082c9;
|
||||||
|
color: #fff; }
|
||||||
|
.edit_credential .custom_fields table thead th.field_actions {
|
||||||
|
width: 15%; }
|
||||||
|
.edit_credential .custom_fields table tr td.field_actions {
|
||||||
|
font-size: 13px; }
|
||||||
|
.edit_credential .custom_fields table tr td, .edit_credential .custom_fields table tr th {
|
||||||
|
padding: 5px; }
|
||||||
|
|
||||||
.settings-container div {
|
.settings-container div {
|
||||||
padding-left: 15px; }
|
padding-left: 15px; }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AAAA,kBAAkB;EAChB,YAAY,EAAE,IAAI;EAClB,0BAAO;IACL,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,KAAK;ICOd,qBAAqB,EDNI,GAAG;ICO5B,aAAa,EDPY,GAAG;ICQ5B,eAAe,EAAE,WAAW;IAAG,qDAAqD;IDPlF,UAAU,EAAE,gCAA+B;IAEzC,gCAAE;MACA,YAAY,EAAE,IAAI;IAEpB,uCAAS;MACP,SAAS,EAAE,IAAI;MACf,OAAO,EAAE,MAAM;EAIrB,gCAAa;IACX,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,IAAI;IACV,GAAG,EAAE,KAA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AAE,kBAAkB;EAC3B,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,oBAAoB;;AAElC,UAAU;EACR,OAAO,EAAE,IAAI;;AAGb,kBAAI;EACF,WAAW,EAAE,YAAY;EACzB,YAAY,EAAE,YAAY",
|
||||||
"sources": ["../sass/container.scss","../sass/mixins.scss","../sass/partials/button.scss","../sass/partials/tabs.scss","../sass/partials/pwgen.scss","../sass/vaults.scss","../sass/credentials.scss","../sass/menu.scss","../sass/app.scss"],
|
"sources": ["../sass/container.scss","../sass/mixins.scss","../sass/partials/button.scss","../sass/partials/tabs.scss","../sass/partials/pwgen.scss","../sass/vaults.scss","../sass/credentials.scss","../sass/menu.scss","../sass/app.scss"],
|
||||||
"names": [],
|
"names": [],
|
||||||
"file": "app.css"
|
"file": "app.css"
|
||||||
|
|
|
@ -34,10 +34,6 @@ angular.module('passmanApp')
|
||||||
color: 'purple'
|
color: 'purple'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
$scope.pwGenerated = function(pass){
|
|
||||||
$scope.storedCredential.password_repeat = pass;
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.pwSettings = {
|
$scope.pwSettings = {
|
||||||
'length': 12,
|
'length': 12,
|
||||||
'useUppercase': true,
|
'useUppercase': true,
|
||||||
|
@ -71,7 +67,7 @@ angular.module('passmanApp')
|
||||||
$location.path('/vault/'+ $routeParams.vault_id);
|
$location.path('/vault/'+ $routeParams.vault_id);
|
||||||
} else {
|
} else {
|
||||||
$scope.storedCredential = storedCredential;
|
$scope.storedCredential = storedCredential;
|
||||||
$scope.storedCredential.password_repeat = storedCredential.password;
|
$scope.storedCredential.password_repeat = angular.copy(storedCredential.password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,4 +84,35 @@ angular.module('passmanApp')
|
||||||
$scope.isActiveTab = function (tab) {
|
$scope.isActiveTab = function (tab) {
|
||||||
return tab.url == $scope.currentTab.url;
|
return tab.url == $scope.currentTab.url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Below general edit functions
|
||||||
|
*/
|
||||||
|
|
||||||
|
$scope.pwGenerated = function(pass){
|
||||||
|
$scope.storedCredential.password_repeat = pass;
|
||||||
|
};
|
||||||
|
|
||||||
|
var _customField = {
|
||||||
|
label: '',
|
||||||
|
value: '',
|
||||||
|
secret: false
|
||||||
|
};
|
||||||
|
$scope.new_custom_field = angular.copy(_customField);
|
||||||
|
|
||||||
|
$scope.addCustomField = function(){
|
||||||
|
if(!$scope.new_custom_field.label){
|
||||||
|
//@TODO move OC.Notification to a service
|
||||||
|
OC.Notification.showTemporary('Please fill in a label');
|
||||||
|
}
|
||||||
|
if(!$scope.new_custom_field.value){
|
||||||
|
//@TODO move OC.Notification to a service
|
||||||
|
OC.Notification.showTemporary('Please fill in a value!');
|
||||||
|
}
|
||||||
|
if(!$scope.new_custom_field.label || !$scope.new_custom_field.value){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$scope.storedCredential.custom_fields.push(angular.copy($scope.new_custom_field));
|
||||||
|
$scope.new_custom_field = angular.copy(_customField);
|
||||||
|
}
|
||||||
}]);
|
}]);
|
||||||
|
|
|
@ -144,7 +144,7 @@ angular.module('passmanApp')
|
||||||
scope.$watch("password", function () {
|
scope.$watch("password", function () {
|
||||||
scope.model = scope.password;
|
scope.model = scope.password;
|
||||||
scope.password_repeat = scope.model;
|
scope.password_repeat = scope.model;
|
||||||
scope.callback(scope.password)
|
|
||||||
if(scope.password !== undefined && scope.password !== null && scope.password !== "") {
|
if(scope.password !== undefined && scope.password !== null && scope.password !== "") {
|
||||||
scope.passwordNotNull = true;
|
scope.passwordNotNull = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -153,6 +153,7 @@ angular.module('passmanApp')
|
||||||
});
|
});
|
||||||
//
|
//
|
||||||
scope.onSuccess = function(e) {
|
scope.onSuccess = function(e) {
|
||||||
|
//@TODO move OC.Notification to a service
|
||||||
OC.Notification.showTemporary('Password copied to clipboard!');
|
OC.Notification.showTemporary('Password copied to clipboard!');
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
};
|
};
|
||||||
|
@ -177,6 +178,7 @@ angular.module('passmanApp')
|
||||||
scope.generatePasswordProgress();
|
scope.generatePasswordProgress();
|
||||||
} else {
|
} else {
|
||||||
scope.disabled = false;
|
scope.disabled = false;
|
||||||
|
scope.callback(scope.password)
|
||||||
}
|
}
|
||||||
}, 10);
|
}, 10);
|
||||||
};
|
};
|
||||||
|
|
19
js/app/filters/range.js
Normal file
19
js/app/filters/range.js
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc filter
|
||||||
|
* @name passmanApp.filter:propsFilter
|
||||||
|
* @function
|
||||||
|
* @description
|
||||||
|
* # propsFilter
|
||||||
|
* Filter in the passmanApp.
|
||||||
|
*/
|
||||||
|
angular.module('passmanApp')
|
||||||
|
.filter('range', function() {
|
||||||
|
return function(val, range) {
|
||||||
|
range = parseInt(range);
|
||||||
|
for (var i=0; i<range; i++)
|
||||||
|
val.push(i);
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
});
|
|
@ -25,9 +25,9 @@ angular.module('passmanApp')
|
||||||
'favicon': null,
|
'favicon': null,
|
||||||
'renew_interval': null,
|
'renew_interval': null,
|
||||||
'expire_time': null,
|
'expire_time': null,
|
||||||
'delete_time': null,
|
'delete_time': 0,
|
||||||
'files': null,
|
'files': [],
|
||||||
'custom_fields': null,
|
'custom_fields': [],
|
||||||
'otp': null,
|
'otp': null,
|
||||||
'hidden': false
|
'hidden': false
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,7 +17,7 @@ angular.module('views/partials/forms/edit_credential/basics.html', []).run(['$te
|
||||||
angular.module('views/partials/forms/edit_credential/custom_fields.html', []).run(['$templateCache', function($templateCache) {
|
angular.module('views/partials/forms/edit_credential/custom_fields.html', []).run(['$templateCache', function($templateCache) {
|
||||||
'use strict';
|
'use strict';
|
||||||
$templateCache.put('views/partials/forms/edit_credential/custom_fields.html',
|
$templateCache.put('views/partials/forms/edit_credential/custom_fields.html',
|
||||||
'');
|
'<div class="row"><div class="col-xs-4"><label>Field label</label><input type="text" ng-model="new_custom_field.label"></div><div class="col-xs-4"><label>Field value</label><input type="text" ng-model="new_custom_field.value" ng-show="!new_custom_field.secret"> <input type="password" ng-model="new_custom_field.value" ng-show="new_custom_field.secret"><label><input type="checkbox" ng-model="new_custom_field.secret"> Secret value</label></div><div class="col-xs-2"><label class="invisible">Add</label><button ng-click="addCustomField()">+</button></div></div><div class="row custom_fields" ng-if="storedCredential.custom_fields.length > 0"><div class="col-xs-12 table" ng-init="edit = false;"><table><thead><tr><th class="field_label">Label</th><th class="field_value">Value</th><th class="field_secret">Secret value</th><th class="field_actions">Actions</th></tr></thead><tr ng-repeat="field in storedCredential.custom_fields"><td><span ng-show="!edit">{{field.label}}</span> <input ng-model="field.label" type="text" ng-show="edit"></td><td><span ng-if="!field.secret && !edit">{{field.value}}</span> <span ng-if="field.secret && !edit"><span ng-repeat="n in [] | range:field.value.length">*</span></span> <input ng-model="field.value" type="text" ng-show="edit && !secret"> <input ng-model="field.value" type="text" ng-show="edit && secret"></td><td><input type="checkbox" ng-model="field.secret"></td><td class="field_actions"><i class="fa fa-edit" ng-click="edit = true"></i> <i class="fa fa-trash"></i></td></tr></table></div></div>');
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
angular.module('views/partials/forms/edit_credential/files.html', []).run(['$templateCache', function($templateCache) {
|
angular.module('views/partials/forms/edit_credential/files.html', []).run(['$templateCache', function($templateCache) {
|
||||||
|
@ -35,7 +35,7 @@ angular.module('views/partials/forms/edit_credential/otp.html', []).run(['$templ
|
||||||
angular.module('views/partials/forms/edit_credential/password.html', []).run(['$templateCache', function($templateCache) {
|
angular.module('views/partials/forms/edit_credential/password.html', []).run(['$templateCache', function($templateCache) {
|
||||||
'use strict';
|
'use strict';
|
||||||
$templateCache.put('views/partials/forms/edit_credential/password.html',
|
$templateCache.put('views/partials/forms/edit_credential/password.html',
|
||||||
'<div class="row"><div class="col-xs-12 col-md-6"><label>Password</label><div><password-gen ng-model="storedCredential.password" settings="pwSettings" callback="pwGenerated"></password-gen><ng-password-meter password="storedCredential.password"></ng-password-meter></div><label>Repeat password</label><div><input type="text" ng-model="storedCredential.password_repeat"></div><label>Renew interval</label><div></div></div><div class="col-xs-12 col-md-6">Password generation settings<div class="password_settings"><div class="col-xs-12 col-sm-12 col-lg-4"><label><span class="label">Password length</span><br><input type="number" ng-model="pwSettings.length" min="1"></label><label><span class="label">Minimum amount of digits</span><br><input type="number" ng-model="pwSettings.minimumDigitCount" min="0"></label></div><div class="col-xs-12 col-sm-12 col-lg-6"><label><input type="checkbox" ng-model="pwSettings.useUppercase"> <span class="label">Use uppercase letters (ABC)</span></label><label><input ng-model="pwSettings.useLowercase" type="checkbox" id="lower"> <span class="label">Use lowercase letters (abc)</span></label><label><input ng-model="pwSettings.useDigits" type="checkbox" id="digits"> <span class="label">Use numbers (0-9)</span></label><label><input type="checkbox" id="special" ng-model="pwSettings.useSpecialChars"> <span class="label">Use special characters (!@#$)</span></label><label><input type="checkbox" id="ambig" ng-model="pwSettings.avoidAmbiguousCharacters"> <span class="label">Avoid ambiguous characters (i l 0 o )</span></label><label><input type="checkbox" ng-model="pwSettings.requireEveryCharType" id="reqevery"> <span class="label">Require every character type</span></label></div></div></div></div>');
|
'<div class="row"><div class="col-xs-12 col-md-5 col-lg-5"><label>Password</label><div><password-gen ng-model="storedCredential.password" settings="pwSettings" callback="pwGenerated"></password-gen><ng-password-meter password="storedCredential.password"></ng-password-meter></div><label>Repeat password</label><div><input type="password" ng-model="storedCredential.password_repeat"></div><label>Renew interval</label><div></div></div><div class="col-xs-12 col-md-7 col-lg-7">Password generation settings<div class="row"><div class="password_settings"><div class="col-xs-12 col-sm-5 col-lg-4"><label><span class="label">Password length</span><br><input type="number" ng-model="pwSettings.length" min="1"></label><label><span class="label">Minimum amount of digits</span><br><input type="number" ng-model="pwSettings.minimumDigitCount" min="0"></label></div><div class="col-xs-12 col-sm-6 col-lg-6"><label><input type="checkbox" ng-model="pwSettings.useUppercase"> <span class="label sm">Use uppercase letters</span></label><label><input ng-model="pwSettings.useLowercase" type="checkbox" id="lower"> <span class="label sm">Use lowercase letters</span></label><label><input ng-model="pwSettings.useDigits" type="checkbox" id="digits"> <span class="label sm">Use numbers</span></label><label><input type="checkbox" id="special" ng-model="pwSettings.useSpecialChars"> <span class="label sm">Use special characters</span></label><label><input type="checkbox" id="ambig" ng-model="pwSettings.avoidAmbiguousCharacters"> <span class="label sm">Avoid ambiguous characters</span></label><label><input type="checkbox" ng-model="pwSettings.requireEveryCharType" id="reqevery"> <span class="label sm">Require every character type</span></label></div></div></div></div></div>');
|
||||||
}]);
|
}]);
|
||||||
|
|
||||||
angular.module('views/partials/password-meter.html', []).run(['$templateCache', function($templateCache) {
|
angular.module('views/partials/password-meter.html', []).run(['$templateCache', function($templateCache) {
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
.credential-table{
|
.credential-table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 44px;
|
margin-top: 44px;
|
||||||
tr:hover{
|
tr:hover {
|
||||||
background-color: darken(#fff, 4%);
|
background-color: darken(#fff, 4%);
|
||||||
}
|
}
|
||||||
tr{
|
tr {
|
||||||
td{
|
td {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
border-bottom: 1px solid #eeeeee;
|
border-bottom: 1px solid #eeeeee;
|
||||||
.label{
|
.label {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.tags{
|
.tags {
|
||||||
float: right;
|
float: right;
|
||||||
.tag{
|
.tag {
|
||||||
background-color: rgba(240,240,240,.9);
|
background-color: rgba(240, 240, 240, .9);
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.icon-more{
|
.icon-more {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
float: right;
|
float: right;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
width: 32px;
|
width: 32px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.icon-more:hover{
|
.icon-more:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.popovermenu {
|
.popovermenu {
|
||||||
|
@ -43,10 +43,10 @@
|
||||||
display: block;
|
display: block;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 75px;
|
height: 75px;
|
||||||
li{
|
li {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
}
|
}
|
||||||
.menuitem{
|
.menuitem {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
@ -59,17 +59,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit_credential {
|
.edit_credential {
|
||||||
label{
|
label {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
input[type="text"],input[type="password"]{
|
input[type="text"], input[type="password"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.tags{
|
.tags {
|
||||||
float: left;
|
float: left;
|
||||||
.tag{
|
.tag {
|
||||||
background-color: rgba(240,240,240,.9);
|
background-color: rgba(240, 240, 240, .9);
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
@ -86,8 +87,35 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
.label {
|
.label {
|
||||||
|
&.sm{
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.custom_fields {
|
||||||
|
margin-top: 10px;
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
thead {
|
||||||
|
th {
|
||||||
|
background-color: #0082c9;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
th.field_actions {
|
||||||
|
width: 15%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
tr {
|
||||||
|
td.field_actions {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
td, th {
|
||||||
|
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -24,6 +24,7 @@ script('passman', 'app/controllers/menu');
|
||||||
script('passman', 'app/controllers/vault');
|
script('passman', 'app/controllers/vault');
|
||||||
script('passman', 'app/controllers/credential');
|
script('passman', 'app/controllers/credential');
|
||||||
script('passman', 'app/controllers/edit_credential');
|
script('passman', 'app/controllers/edit_credential');
|
||||||
|
script('passman', 'app/filters/range');
|
||||||
script('passman', 'app/filters/propsfilter');
|
script('passman', 'app/filters/propsfilter');
|
||||||
script('passman', 'app/services/cacheservice');
|
script('passman', 'app/services/cacheservice');
|
||||||
script('passman', 'app/services/vaultservice');
|
script('passman', 'app/services/vaultservice');
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<label>Field label</label>
|
||||||
|
<input type="text" ng-model="new_custom_field.label">
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4">
|
||||||
|
<label>Field value</label>
|
||||||
|
<input type="text" ng-model="new_custom_field.value" ng-show="!new_custom_field.secret">
|
||||||
|
<input type="password" ng-model="new_custom_field.value" ng-show="new_custom_field.secret">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" ng-model="new_custom_field.secret"> Secret value
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-2">
|
||||||
|
<label class="invisible">Add</label>
|
||||||
|
<button ng-click="addCustomField()">+</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row custom_fields" ng-if="storedCredential.custom_fields.length > 0">
|
||||||
|
<div class="col-xs-12 table" ng-init="edit = false;">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="field_label">Label</th>
|
||||||
|
<th class="field_value">Value</th>
|
||||||
|
<th class="field_secret">Secret value</th>
|
||||||
|
<th class="field_actions">Actions</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr ng-repeat="field in storedCredential.custom_fields">
|
||||||
|
<td>
|
||||||
|
<span ng-show="!edit">{{field.label}}</span>
|
||||||
|
<input ng-model="field.label" type="text" ng-show="edit">
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<span ng-if="!field.secret && !edit">{{field.value}}</span>
|
||||||
|
<span ng-if="field.secret && !edit"><span ng-repeat="n in [] | range:field.value.length">*</span></span>
|
||||||
|
|
||||||
|
|
||||||
|
<input ng-model="field.value" type="text" ng-show="edit && !secret">
|
||||||
|
<input ng-model="field.value" type="text" ng-show="edit && secret">
|
||||||
|
</td>
|
||||||
|
<td><input type="checkbox" ng-model="field.secret"></td>
|
||||||
|
<td class="field_actions">
|
||||||
|
<i class="fa fa-edit" ng-click ="edit = true"></i>
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -1,5 +1,5 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-5 col-lg-5">
|
||||||
|
|
||||||
<label>Password</label>
|
<label>Password</label>
|
||||||
<div>
|
<div>
|
||||||
|
@ -10,18 +10,19 @@
|
||||||
</div>
|
</div>
|
||||||
<label>Repeat password</label>
|
<label>Repeat password</label>
|
||||||
<div>
|
<div>
|
||||||
<input type="text" ng-model="storedCredential.password_repeat">
|
<input type="password" ng-model="storedCredential.password_repeat">
|
||||||
</div>
|
</div>
|
||||||
<label>Renew interval</label>
|
<label>Renew interval</label>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-md-6">
|
<div class="col-xs-12 col-md-7 col-lg-7">
|
||||||
Password generation settings
|
Password generation settings
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
<div class="password_settings">
|
<div class="password_settings">
|
||||||
<div class="col-xs-12 col-sm-12 col-lg-4">
|
<div class="col-xs-12 col-sm-5 col-lg-4">
|
||||||
<label>
|
<label>
|
||||||
<span class="label">Password length</span><br />
|
<span class="label">Password length</span><br />
|
||||||
<input type="number" ng-model="pwSettings.length" min="1">
|
<input type="number" ng-model="pwSettings.length" min="1">
|
||||||
|
@ -33,39 +34,40 @@
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 col-sm-12 col-lg-6">
|
<div class="col-xs-12 col-sm-6 col-lg-6">
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox"
|
<input type="checkbox"
|
||||||
ng-model="pwSettings.useUppercase">
|
ng-model="pwSettings.useUppercase">
|
||||||
<span class="label">Use uppercase letters (ABC)</span>
|
<span class="label sm">Use uppercase letters</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
ng-model="pwSettings.useLowercase" type="checkbox"
|
ng-model="pwSettings.useLowercase" type="checkbox"
|
||||||
id="lower">
|
id="lower">
|
||||||
<span class="label">Use lowercase letters (abc)</span>
|
<span class="label sm">Use lowercase letters</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input ng-model="pwSettings.useDigits" type="checkbox"
|
<input ng-model="pwSettings.useDigits" type="checkbox"
|
||||||
id="digits">
|
id="digits">
|
||||||
<span class="label">Use numbers (0-9)</span>
|
<span class="label sm">Use numbers</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="special"
|
<input type="checkbox" id="special"
|
||||||
ng-model="pwSettings.useSpecialChars">
|
ng-model="pwSettings.useSpecialChars">
|
||||||
<span class="label">Use special characters (!@#$)</span>
|
<span class="label sm">Use special characters</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" id="ambig"
|
<input type="checkbox" id="ambig"
|
||||||
ng-model="pwSettings.avoidAmbiguousCharacters">
|
ng-model="pwSettings.avoidAmbiguousCharacters">
|
||||||
<span class="label">Avoid ambiguous characters (i l 0 o )</span>
|
<span class="label sm">Avoid ambiguous characters</span>
|
||||||
</label>
|
</label>
|
||||||
<label>
|
<label>
|
||||||
<input type="checkbox" ng-model="pwSettings.requireEveryCharType"
|
<input type="checkbox" ng-model="pwSettings.requireEveryCharType"
|
||||||
id="reqevery">
|
id="reqevery">
|
||||||
<span class="label">Require every character type</span>
|
<span class="label sm">Require every character type</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue