205stelzear / elections

Website / Webapp to create and view elections for any Scout group
https://205stelzear-elections.v-ed.ca/
MIT License
0 stars 0 forks source link

Add configurable possibility to vote between min and max votes per voter #45

Closed V-ed closed 5 years ago

V-ed commented 5 years ago

If there is a case where it is allowed to vote between 2 and 4 candidates, then it should be possible in the application.

Currently, the number is static, you can only vote for x candidates, not between x and y candidates.

V-ed commented 5 years ago

Some test code :

<div class="col-sm-9 row">
    <div class="col-1 col-form-label">
        <span>Min :</span>
    </div>
    <div class="col-3">
        <input type="number" class="form-control is-invalid is-popable" id="number-of-votes" min="1" name="numberOfVotes" data-placement="top" required="" data-original-title="" title="" data-content="Le nombre de vote ne peut être vide." max="0">
    </div>
    <div class="col-1 col-form-label">
        <span>Max :</span>
    </div>
    <div class="col-3">
        <input type="number" class="form-control is-invalid is-popable" id="number-of-votes" max="5" name="numberOfVotes" data-placement="top" required="" data-original-title="" title="" data-content="Le nombre de vote ne peut être vide.">
    </div>
</div>

On desktop this looks (looks, not necessarly works) good, but I didn't test this code in mobile, which probably looks terrible (those col-1 will hurt...)

Also, I used spans instead of the expected labels, which would need to be changed.