diff --git a/changedetectionio/static/js/diff-overview.js b/changedetectionio/static/js/diff-overview.js index 8cbe7dcd..767cf6e1 100644 --- a/changedetectionio/static/js/diff-overview.js +++ b/changedetectionio/static/js/diff-overview.js @@ -90,5 +90,10 @@ $(document).ready(function () { } } - + $('#diff-form').on('submit', function (e) { + if ($('select[name=from_version]').val() === $('select[name=to_version]').val()) { + e.preventDefault(); + alert('Error - You are trying to compare the same version.'); + } + }); }); diff --git a/changedetectionio/templates/diff.html b/changedetectionio/templates/diff.html index 6cac4605..0197bfc9 100644 --- a/changedetectionio/templates/diff.html +++ b/changedetectionio/templates/diff.html @@ -13,7 +13,7 @@
-
+
{% if versions|length >= 1 %} Compare