aboutsummaryrefslogtreecommitdiff
path: root/views/home.html
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2014-05-15 16:00:45 +0200
committerPacien TRAN-GIRARD2014-05-15 16:00:45 +0200
commitd8bae84fff7977844fa2b57b15b86a831b73aed2 (patch)
treed243a1729f0239421c6454f0b76243b6e1729ce7 /views/home.html
parent4f21da45d77211da1aab786bceda8b19f9ccbcbc (diff)
downloadwebcastor-d8bae84fff7977844fa2b57b15b86a831b73aed2.tar.gz
First version
Diffstat (limited to 'views/home.html')
-rw-r--r--views/home.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/views/home.html b/views/home.html
new file mode 100644
index 0000000..f6fef09
--- /dev/null
+++ b/views/home.html
@@ -0,0 +1,31 @@
1<h2>Create a channel</h2>
2
3<form method="post" action="/">
4 <label for="passwordField">Password (optional)</label>
5 <input type="password" id="passwordField" name="password">
6 <input type="submit" id="randomButton" value="Generate random password">
7 <input type="submit" value="Create a new channel">
8</form>
9
10<br>
11<hr>
12
13<a href="/client">Test client</a> - <a href="https://github.com/Pacien/Webcastor">Sources</a>
14
15<script type="text/javascript">
16 randomButton.addEventListener("click", function(event) {
17 event.preventDefault();
18
19 var randomPassword = Math.random().toString(36).substr(2, 10);
20
21 passwordField.type = "text";
22 passwordField.value = randomPassword;
23 });
24
25 passwordField.addEventListener("input", function(event) {
26 if (passwordField.value.length <= 1) {
27 passwordField.type = "password";
28 }
29 });
30
31</script>