Fix maxVoters minimum value and value of boolean areVotersKnown
This commit is contained in:
@ -29,9 +29,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<label for="areVotersKnown" class="block text-sm font-medium text-gray-700">Voter Access</label>
|
<label for="areVotersKnown" class="block text-sm font-medium text-gray-700">Voter Access</label>
|
||||||
<select id="areVotersKnown" x-model="election.areVotersKnown" required
|
<select id="areVotersKnown" x-model="election.areVotersKnown" required
|
||||||
|
@change="election.areVotersKnown = JSON.parse(election.areVotersKnown)"
|
||||||
class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500">
|
class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500">
|
||||||
<option :value="true">Known voters only</option>
|
<option :value=true>Known voters only</option>
|
||||||
<option :value="false">Open to anyone</option>
|
<option :value=false>Open to anyone</option>
|
||||||
</select>
|
</select>
|
||||||
<p class="text-sm text-gray-500 mt-1">Known voters only = codes will be generated for distribution.</p>
|
<p class="text-sm text-gray-500 mt-1">Known voters only = codes will be generated for distribution.</p>
|
||||||
</div>
|
</div>
|
||||||
@ -39,7 +40,7 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="maxVoters" class="block text-sm font-medium text-gray-700">Maximum Number of Voters</label>
|
<label for="maxVoters" class="block text-sm font-medium text-gray-700">Maximum Number of Voters</label>
|
||||||
<input type="number" id="maxVoters" x-model.number="election.maxVoters" min="1"
|
<input type="number" id="maxVoters" x-model.number="election.maxVoters"
|
||||||
class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500">
|
class="mt-1 block w-full border-gray-300 rounded-md shadow-sm focus:ring-indigo-500 focus:border-indigo-500">
|
||||||
<p class="text-sm text-gray-500">0 = unlimited</p>
|
<p class="text-sm text-gray-500">0 = unlimited</p>
|
||||||
<template x-if="election.areVotersKnown && election.maxVoters <= 0">
|
<template x-if="election.areVotersKnown && election.maxVoters <= 0">
|
||||||
|
Reference in New Issue
Block a user