mirror of https://github.com/keeweb/keeweb.git
fix #1553: empty fields display for templates
This commit is contained in:
parent
02fe2b1754
commit
855370074f
|
@ -156,11 +156,19 @@ class DetailsView extends View {
|
|||
if (hideEmptyFields) {
|
||||
const value = fieldView.model.value();
|
||||
if (!value || value.length === 0 || value.byteLength === 0) {
|
||||
if (
|
||||
this.model.isJustCreated &&
|
||||
['$UserName', '$Password'].indexOf(fieldView.model.name) >= 0
|
||||
) {
|
||||
return; // don't hide user for new records
|
||||
if (this.model.isJustCreated) {
|
||||
const fieldsHiddenForNewEntriesWhenEmpty = [
|
||||
'$URL',
|
||||
'$Notes',
|
||||
'Tags',
|
||||
'Expires',
|
||||
'History'
|
||||
];
|
||||
if (
|
||||
!fieldsHiddenForNewEntriesWhenEmpty.includes(fieldView.model.name)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
fieldView.hide();
|
||||
}
|
||||
|
|
|
@ -180,7 +180,7 @@ class ListView extends View {
|
|||
}
|
||||
|
||||
createTemplate() {
|
||||
if (!this.model.settings.templateHelpShown_) {
|
||||
if (!this.model.settings.templateHelpShown) {
|
||||
Alerts.yesno({
|
||||
icon: 'sticky-note-o',
|
||||
header: Locale.listAddTemplateHeader,
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Release notes
|
||||
-------------
|
||||
##### v1.15.6 (2020-08-08)
|
||||
`-` fix #1553: empty fields display for templates
|
||||
|
||||
##### v1.15.5 (2020-06-13)
|
||||
`-` fix #1539: broken code signing on Windows
|
||||
|
||||
|
|
Loading…
Reference in New Issue