5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1.0">
6 <title>Broadcaster
</title>
7 <script type=
"text/javascript">
8 function deleteItem(sender) {
9 sender.parentNode.remove();
12 const p = document.createElement('p');
13 const temp = document.getElementById('item-template');
14 p.innerHTML = temp.innerHTML;
15 const marker = document.getElementById('add-item');
16 const parent = marker.parentNode;
17 parent.insertBefore(p, marker);
23 <h1>A specific playlist
</h1>
31 <form action=
"/playlist/submit" method=
"POST">
32 <input type=
"hidden" name=
"playlistId" value=
"{{.Playlist.Id}}">
34 <input type=
"checkbox" id=
"playlistEnabled" name=
"playlistEnabled" value=
"1" {{if .Playlist.Enabled}} checked {{end}}
>
35 <label for=
"playlistEnabled">Playlist enabled?
</label><br>
38 <label for=
"playlistName">Name:
</label>
39 <input type=
"text" id=
"playlistName" name=
"playlistName" value=
"{{.Playlist.Name}}">
42 <label for=
"playlistStartTime">Transmission Start:
</label>
43 <input type=
"datetime-local" id=
"playlistStartTime" name=
"playlistStartTime" value=
"{{.Playlist.StartTime}}">
45 <h3>Playlist Items
</h3>
49 <input type=
"text" name=
"delaySeconds" value=
"{{.DelaySeconds}}">
51 <select name=
"isRelative">
52 <option value=
"0">start of transmission
</option>
53 <option value=
"1" {{if .IsRelative}}
selected=
"selected" {{end}}
>previous item
</option>
56 <select name=
"filename">{{$f := .Filename}}
57 <option value=
"">(no file selected)
</option>
59 <option value=
"{{.}}" {{if eq . $f }}
selected=
"selected" {{end}}
>{{.}}
</option>
62 <a href=
"#" onclick=
"deleteItem(this)">(Delete Item)
</a>
66 <a href=
"#" onclick=
"addItem()" id=
"add-item">Add Item
</a>
69 <input type=
"submit" value=
"Save Playlist">
74 <form action=
"/playlist/delete" method=
"POST">
75 <input type=
"hidden" name=
"playlistId" value=
"{{.Playlist.Id}}">
77 <input type=
"submit" value=
"Delete Playlist">
81 <template id=
"item-template">
83 <input type=
"text" name=
"delaySeconds" value=
"0">
85 <select name=
"isRelative">
86 <option value=
"0">start of transmission
</option>
87 <option value=
"1">previous item
</option>
90 <select name=
"filename">
91 <option value=
"">(no file selected)
</option>
93 <option value=
"{{.}}">{{.}}
</option>
96 <a href=
"#" onclick=
"deleteItem(this)">(Delete Item)
</a>