4
<meta name="viewport" content="width=device-width, initial-scale=1">
5
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.2.0/united/bootstrap.min.css" rel="stylesheet">
6
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
7
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
9
function enableControls() {
10
disabled = !($('#enable')[0].checked);
11
$('#popup')[0].disabled=disabled;
12
$('#persist')[0].disabled=disabled;
13
$('#sound')[0].disabled=disabled;
14
$('#vibrate')[0].disabled=disabled;
15
$('#counter')[0].disabled=disabled;
21
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
22
for(var i = 0; i < hashes.length; i++)
24
hash = hashes[i].split('=');
25
vars[hash[0]] = decodeURIComponent(hash[1]);
28
$("<div class='alert alert-danger' role='alert'>" + vars["error"] + "</div>").insertAfter ($("h1"))
33
<title>Send a notification</title>
5
34
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
8
<form method="POST" action="/play-notify-form" >
9
<label for="nick">Nick:</label><br><input id="nick" name="nick" type="text" autofocus><br>
10
<label for="data">Message (JSON):</label><br><textarea id="data" name="data" cols="64" rows="8"></textarea><br>
11
<input type="submit" value="notify">
37
<div class="container">
38
<H1>Send a notification</H1>
39
<form method="POST" action="/play-notify-form" role="form">
41
<div class="form-group">
42
<label for="nick">Nick:</label>
43
<input class="form-control" placeholder="Message destination" id="nick" name="nick" type="text" autofocus>
45
<div class="form-group">
46
<label for="message">Message:</label>
47
<textarea class="form-control" placeholder="Message" id="message" name="message" rows="5"></textarea>
49
<div class="checkbox">
50
<label> <input type="checkbox" id="enable" name="enable" onclick='enableControls()' checked=true> Enable Notifications </label>
52
<div class="checkbox">
53
<label> <input type="checkbox" id="popup" name="popup" checked=true> Enable Popup </label>
54
<label> <input type="checkbox" id="persist" name="persist" checked=true> Persistent </label>
55
<label> <input type="checkbox" id="sound" name="sound" checked=true> Make Sound </label>
56
<label> <input type="checkbox" id="vibrate" name="vibrate" checked=true> Vibrate </label>
58
<input class="form-control" placeholder="Set Counter" id="counter" name="counter" type="number" value=42 autofocus>
61
<button type="submit" class="btn btn-primary" value="notify">Submit</button>