Made a number of small enhancements. The django-recaptcha fields have been removed from the django forms as they're a dependency nightmare. The module isn't really required and the same functionality can be serviced using HTML and JS and it also paves the way to perform testing with python 3 over python 2.7. The about page has been removed for now as it's not prod ready and all it currently does it mention the software used to build DEMOS2.

This commit is contained in:
vince0656 2018-07-16 10:16:06 +01:00
parent 4d4f77207b
commit ff967877cb
7 changed files with 26 additions and 85 deletions

View file

@ -37,21 +37,6 @@ $("label input[type=checkbox]").change(function() {
updateCheckboxInteractivity();
});
function dropDownFragsNotZero(frags) {
var valid = false;
for(var i = 0; i < frags.length; i++) {
var frag = frags[i];
if(frag !== "0") {
valid = true;
break;
}
}
return valid;
}
function isVotingInputValid() {
var valid = true;
@ -60,6 +45,10 @@ function isVotingInputValid() {
valid = false;
}
if(selectedCount < MAX_SELECTIONS) {
valid = false;
}
// This will highlight when people haven't selected enough options
if(!valid) {
@ -204,6 +193,10 @@ function voteSuccessfullyReceived() {
title.text('Vote Successfully Received');
var bodyText = "Thank you for voting!";
if(POLL_NUM !== POLL_COUNT) {
bodyText += " You can vote on the next poll by closing down this dialog and clicking 'Next Poll'.";
}
var p = document.createElement("p");
p.innerHTML = bodyText;
body.empty();