-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsuVoter.html
149 lines (149 loc) · 6.25 KB
/
csuVoter.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!--
Title: CSU-P Voting Blockchain Project
Created by: Chris Toomey, Logan Vineyard, & Aaron Skilling
Date updated: January 21, 2020
Instructor: Dr. Kreminski
-->
<!-- Begin Webpage -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CSU-P Student Voting</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>
<body>
<!-- Begin Javascript -->
<script src="voteJS.js" type="text/javascript"></script>
<!-- End of Javascript -->
<!-- Begin Header Section -->
<div class="header">
<div class="imgHeader column">
<img src="csupueblo-logo.png" alt="CSU-P Wolfie Logo" class="imgLogo">
</div>
<div class="textHeader column">
<h1 class="centertxt">CSU-P Voting</h1>
</div>
<div class="column">
<ul class="navbar">
<li><a href="csuToken.html">Wolfie Token(ERC 20)</a></li>
<li class="active"><a href="csuVoter.html">CSU-P Voting</a></li>
<li><a href="csuSimple.html">Simple Token</a></li>
</ul>
</div>
</div>
<!-- End Header Section -->
<!-- Begin Main Section -->
<div class="main">
<div class="disclaimerHead">
<h2>Project Background</h2>
</div>
<!-- This is the main paragraph -->
<div class="disclaimer">
<h4>This project was created in an effort to display the uses of blockchain technology.
The project was put together by Dr. Kreminski, who is an Instructor at CSU-P, in an effort to introduce
blockchain technology to students. Dr. Kreminski only participated in teaching an introduction to blockchain
and it's uses in applications. The project itself was planned and built by <strong class="fontChange">Chris Toomey, Logan Vineyard, and
Aaron Skilling,</strong> which made it a completely student-built project with less than 10 hours of instruction on
the subject.</h4>
</div>
<div class="voterForm">
<!-- Table that contains all the inputs and buttons -->
<table class="tableView" align="center">
<tr>
<td>
<h2 class="centertxt">This is the Voting Contract!</h2>
</td>
</tr>
<tr>
<td>
<table id="candidateHead"></table>
<button class="btnBtn" onclick="showCandidates();">Show Candidates!</button>
</td>
</tr>
<tr>
<td>
<h2 class="centertxt">Add your candidates here!</h2>
</td>
</tr>
<tr>
<td><!-- This is the add candidates -->
<input id="fName" class="inputbox" onfocus="this.select();" placeholder="First name..." type="text">
<input id="lName" class="inputbox" onfocus="this.select();" placeholder="Last name..." type="text">
<input id="major" class="inputbox" onfocus="this.select();" placeholder="Major..." type="text">
<button class="btnBtn" onclick="addCandidate();">Add Candidate!</button>
</td>
</tr>
<tr>
<td>
<h2 class="centertxt">Update your candidates here!</h2>
</td>
</tr>
<tr>
<td><!-- This is the updater -->
<input id="uCandID" class="inputbox" onfocus="this.select();" placeholder="Candidate ID..." type="text">
<input id="ufName" class="inputbox" onfocus="this.select();" placeholder="First name..." type="text">
<input id="ulName" class="inputbox" onfocus="this.select();" placeholder="Last name..." type="text">
<input id="umajor" class="inputbox" onfocus="this.select();" placeholder="Major..." type="text">
<button class="btnBtn" onclick="updateCandidate();">Update Candidate!</button>
</td>
</tr>
<tr>
<td>
<h2 class="centertxt">Approve the voters here!</h2>
</td>
</tr>
<tr>
<td><!-- This is the transfer function -->
<input id="voterReceiver" class="inputbox" onfocus="this.select();" placeholder="Address of voter..." type="text">
<button class="btnBtn" onclick="approveVoter();">Approve Voter!</button>
</td>
</tr>
<tr>
<td>
<h2 class="centertxt">Vote for your candidate here!</h2>
</td>
</tr>
<tr>
<td><!-- This is the transfer from function -->
<input id="candidateVoteID" class="inputbox" onfocus="this.select();" placeholder="ID of Candidate..." type="text">
<button class="btnBtn" onclick="voteFor();">Vote!</button>
</td>
</tr>
<tr>
<td>
<h2 class="centertxt">Check user ability to vote and if they voted!</h2>
</td>
</tr>
<tr>
<td><!-- This is the transfer function -->
<input id="addressApproval" class="inputbox" onfocus="this.select();" placeholder="Address of Voter..." type="text">
<button class="btnBtn" onclick="apprVoters();">Check Availability!</button>
</td>
</tr>
</table>
</div>
</div>
<!-- End Main Section -->
<!-- Begin Footer Section -->
<div class="footer">
<div class ="footContent">
<div class="leftcontent column">
Created by Logan Vineyard, Chris Toomey, and Aaron Skilling, Instructed by Dr. Kremenski
</div>
<div class="midcontent column">
Ethereum Project © <script type="text/javascript">
document.write(new Date().getFullYear());
</script>
</div>
<div class="rightcontent column">
Resources used: Robsten Network, Infura, Remix
</div>
</div>
</div>
<!-- End Footer Section -->
</body>
</html>
<!-- End Of Webpage -->