Added error message for plain/polite issue.

The issue is that all tests involve either plain or polite and so unselecting
both will mean that all tests are unselected.

This patch adds error text that appears when both are unselected.
This commit is contained in:
doncr 2021-02-16 14:38:00 +00:00
parent 8daf3d81da
commit 241bb0e029
3 changed files with 14 additions and 0 deletions

View File

@ -308,6 +308,10 @@ button.btn.btn-primary {
color: red;
}
#politePlainError {
color: red;
}
div.halfSpeed {
font-size: 50%;
text-align: center;

View File

@ -147,6 +147,10 @@
</div>
</div>
<div id="politePlainError" style="display: none">
<div class="text-center mb-2">You must select at least one of 'Plain' and 'Polite'.</div>
</div>
<div class="text-center mb-4">Question pool size: <span id="questionCount">...</span></div>
<div class="row justify-content-center mt-3 ml-2 mr-2">

View File

@ -930,6 +930,12 @@ function updateOptionSummary() {
});
$("#questionCount").text(applicable);
if (!options.plain && !options.polite) {
document.querySelector('#politePlainError').style.display = 'block';
} else {
document.querySelector('#politePlainError').style.display = 'none';
}
}
function updateVoiceSelect() {