diff --git a/install/assets/css/installer.css b/install/assets/css/installer.css
index 3fca0c954..fbdf737e7 100644
--- a/install/assets/css/installer.css
+++ b/install/assets/css/installer.css
@@ -243,6 +243,11 @@ div.alert-danger {
border-color: #ffc107;
}
+#dxcc_button.has-warning {
+ border: 1px solid;
+ border-color: #ffc107;
+}
+
.uppercase {
text-transform: uppercase;
}
diff --git a/install/index.php b/install/index.php
index 4bab6e7f4..bf3baf43f 100644
--- a/install/index.php
+++ b/install/index.php
@@ -1646,7 +1646,7 @@ if (!file_exists('.lock')) {
// Documentation: https://davidstutz.github.io/bootstrap-multiselect/index.html
// template is needed for bs5 support
templates: {
- button: '',
+ button: '',
filter: '
',
},
enableFiltering: true,
@@ -1670,7 +1670,12 @@ if (!file_exists('.lock')) {
'width': '100%',
'height': '39px',
'padding-left': '1px'
- })
+ });
+
+ $('#dxcc_id').on('change', function() {
+ DXCC_Warning();
+ });
+ DXCC_Warning();
});
function check_for_empty_fields() {
@@ -1691,15 +1696,25 @@ if (!file_exists('.lock')) {
}
+ function DXCC_Warning() {
+ if ($("#dxcc_id option:selected").text().includes("= __("Deleted DXCC"); ?>")) {
+ $('#dxcc_button').addClass('has-warning');
+ show_userformwarnings("warning", "= __("Stop here for a Moment. Your chosen DXCC is outdated and not valid anymore. Check which DXCC for this particular location is the correct one. If you are sure, ignore this warning."); ?>");
+ } else {
+ $('#dxcc_button').removeClass('has-warning');
+ hide_userformwarnings();
+ }
+ }
+
function show_userformwarnings(status, message) {
- userFormWarnings.css('display', 'block');
+ userFormWarnings.show();
userFormWarnings.removeClass('alert-warning alert-danger');
userFormWarnings.addClass('alert-' + status);
userFormWarnings.html(message);
}
function hide_userformwarnings() {
- userFormWarnings.css('display', 'none');
+ userFormWarnings.hide();
userFormWarnings.removeClass('alert-warning alert-danger');
}
@@ -1897,7 +1912,7 @@ if (!file_exists('.lock')) {
}
if (checklist_firstuser) {
- if (passwordField.hasClass('has-warning')) {
+ if (passwordField.hasClass('has-warning') || $('#dxcc_button').hasClass('has-warning')) {
checklistFirstUser.removeClass('fa-times-circle');
checklistFirstUser.removeClass('fa-check-circle');
checklistFirstUser.addClass('fa-exclamation-triangle').css('color', '#ffc107');