From 4d4a8ca3b2c3c1cb1ab552c09909f070f4177f8b Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Tue, 28 Jan 2020 10:38:21 -0800 Subject: [PATCH] Trim MaxMind License Key when saving --- data/interfaces/default/settings.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/interfaces/default/settings.html b/data/interfaces/default/settings.html index bee08d84..6f6282e8 100644 --- a/data/interfaces/default/settings.html +++ b/data/interfaces/default/settings.html @@ -2868,11 +2868,13 @@ $(document).ready(function() { } $("#install_geoip_db").click(function () { - if ($.trim($("#maxmind_license_key").val()) === "") { - $("#maxmind_license_key").focus(); + var maxmind_license_key = $("#maxmind_license_key"); + maxmind_license_key.val($.trim(maxmind_license_key.val())); + if (maxmind_license_key.val() === "") { + maxmind_license_key.focus(); showMsg(' Maxmind License Key is required.', false, true, 5000, true); return false; - } else if (!(saveSettings())){ + } else if (!(saveSettings())) { return false; } var msg = 'Are you sure you want to install the GeoLite2 database?

' +