|
9 | 9 | media="screen" |
10 | 10 | /> |
11 | 11 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 12 | + |
| 13 | + <style> |
| 14 | + .container div.d-none { |
| 15 | + display: none!important; |
| 16 | + } |
| 17 | + </style> |
12 | 18 | </head> |
13 | 19 | <body> |
14 | 20 | <nav class="navbar navbar-expand-lg navbar-dark bg-primary"> |
|
25 | 31 | </nav> |
26 | 32 |
|
27 | 33 | <div class="container main p-5"> |
| 34 | + {{ if eq .CanVote 9 }} |
| 35 | + <div id="already-voted" class="alert alert-info alert-dismissible d-flex flex-row align-items-center" role="alert"> |
| 36 | + <h5 class="m-0">You have already voted in this poll.</h5> |
| 37 | + <button class="close m-0" style="cursor: pointer;" onclick="document.getElementById('already-voted').classList.add('d-none');"> |
| 38 | + <span class="align-items-center">×</span> |
| 39 | + </button> |
| 40 | + </div> |
| 41 | + {{ else if eq .CanVote 1 }} |
| 42 | + <div id="db-error" class="alert alert-danger alert-dismissible d-flex flex-row align-items-center" role="alert"> |
| 43 | + <h5 class="m-0">There was an error checking your voting eligibility. Try refreshing the page or contacting the RTPs if the issue persists.</h5> |
| 44 | + <button class="close m-0" style="cursor: pointer;" onclick="document.getElementById('db-error').classList.add('d-none');"> |
| 45 | + <span class="align-items-center">×</span> |
| 46 | + </button> |
| 47 | + </div> |
| 48 | + {{ else if gt .CanVote 1 }} |
| 49 | + <div id="cannot-vote" class="alert alert-warning alert-dismissible d-flex flex-row align-items-center" role="alert"> |
| 50 | + <h5 class="m-0"> |
| 51 | + You are not eligible to vote in this poll. This is likely because you are not an Active Member, |
| 52 | + or because you did not meet the gatekeep requirements by the time the poll opened. |
| 53 | + If you believe this is an error, please contact Evals or Opcomm. |
| 54 | + </h5> |
| 55 | + <button class="close m-0 ml-3" style="cursor: pointer;" onclick="document.getElementById('cannot-vote').classList.add('d-none');"> |
| 56 | + <span class="align-items-center">×</span> |
| 57 | + </button> |
| 58 | + </div> |
| 59 | + {{ end }} |
| 60 | + |
28 | 61 | <h2 style="white-space: normal; word-wrap: break-word;">{{ .ShortDescription }}</h2> |
29 | 62 | {{ if .LongDescription }} |
30 | 63 | <h4>{{ .LongDescription | MakeLinks }}</h4> |
|
38 | 71 | <h4>Results will be available once the poll closes</h4> |
39 | 72 | </div> |
40 | 73 | {{ else }} |
| 74 | + |
41 | 75 | {{/* Displays information about required quorum and number of voters */}} |
42 | 76 | <div id="quorum-info"> |
43 | 77 | <h5>Number of Eligible Voters: {{ len .EligibleVoters }}</h5> |
|
0 commit comments