@ -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.');
});
@ -13,7 +13,7 @@
<script src="{{url_for('static_content', group='js', filename='diff-overview.js')}}" defer></script>
<div id="settings">
<form class="pure-form " action="" method="GET">
<form class="pure-form " action="" method="GET" id="diff-form">
<fieldset>
{% if versions|length >= 1 %}
<strong>Compare</strong>