Disable group name settings with older versions

This commit is contained in:
varjolintu 2020-03-22 12:12:54 +02:00
parent 4b5eb73e37
commit 61d2e33c06
2 changed files with 7 additions and 1 deletions

View file

@ -281,7 +281,7 @@
<input class="form-check-input" type="checkbox" name="showGroupNameInAutocomplete" id="showGroupNameInAutocomplete" value="true" />
<label class="form-check-label" for="showGroupNameInAutocomplete" data-i18n="optionsCheckboxShowGroupNameInAutocomplete"></label>
<span class="form-text text-muted" data-i18n="optionsShowGroupNameInAutocompleteHelpText"></span>
<div class="alert alert-info mt-3 col-lg-9" role="alert">
<div class="alert alert-info mt-3 col-lg-9" role="alert" id="versionRequiredAlert">
<i class="fa fa-exclamation-circle" aria-hidden="true"></i>
<span data-i18n="optionsKeePassXCVersionRequired" i18n-placeholder="2.6.0"></span>
</div>

View file

@ -269,6 +269,12 @@ options.showKeePassXCVersions = function(response) {
$('#tab-about em.versionKPH').text(response.current);
$('#tab-about span.kpxcVersion').text(response.current);
$('#tab-general-settings button.checkUpdateKeePassXC:first').attr('disabled', false);
if (response.current.startsWith('2.6') || response.current === '2.5.3-snapshot') {
$('#tab-general-settings #versionRequiredAlert').hide();
} else {
$('#tab-general-settings #showGroupNameInAutocomplete').attr('disabled', true);
}
};
options.getPartiallyHiddenKey = function(key) {