Skip to content

Commit

Permalink
UI - Show error/warning when trying to compare the same version
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtlmoon committed Feb 1, 2024
1 parent 520650e commit 1945a59
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion changedetectionio/static/js/diff-overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
});
});

0 comments on commit 1945a59

Please sign in to comment.