UI - Show error/warning when trying to compare the same version
This commit is contained in:
@@ -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>
|
<script src="{{url_for('static_content', group='js', filename='diff-overview.js')}}" defer></script>
|
||||||
|
|
||||||
<div id="settings">
|
<div id="settings">
|
||||||
<form class="pure-form " action="" method="GET">
|
<form class="pure-form " action="" method="GET" id="diff-form">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{% if versions|length >= 1 %}
|
{% if versions|length >= 1 %}
|
||||||
<strong>Compare</strong>
|
<strong>Compare</strong>
|
||||||
|
|||||||
Reference in New Issue
Block a user