]> git.plutz.net Git - serve0/blob - templates/preferences.html.sh
ab1cb8b6108617de598dc865f0a37fa7115221d1
[serve0] / templates / preferences.html.sh
1 # Copyright 2015, 2016 Paul Hänsch
2 #
3 # This file is part of Serve0
4
5 # Serve0 is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Serve0 is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
17
18 cat <<EOF
19   <form class="panel switchable top" id="preferences"
20    action="?action=preferences" method="post" accept-charset="UTF-8">
21     <a class="panel toggle" href="#">Hide</a>
22
23     <fieldset>
24       <legend>Watch videos:</legend>
25       <input type="radio" name="watch" value="240p"     $([ "${_COOKIE[watch]}" = 240p     ] && printf 'checked') id="rd_w240p">
26       <label for="rd_w240p">as Download in 240p</label><br>
27       <input type="radio" name="watch" value="480p"     $([ "${_COOKIE[watch]}" = 480p     ] && printf 'checked') id="rd_w480p">
28       <label for="rd_w480p">as Download in 480p</label><br>
29       <input type="radio" name="watch" value="download" $([ "${_COOKIE[watch]}" = download ] && printf 'checked') id="rd_wdown">
30       <label for="rd_wdown">as Download (original)</label><br>
31       <input type="radio" name="watch" value="raspi"    $([ "${_COOKIE[watch]}" = raspi    ] && printf 'checked') id="rd_wrasp">
32       <label for="rd_wrasp">on RaspBerry</label><br>
33       <input type="radio" name="watch" value="player"   $([ "${_COOKIE[watch]}" = player   ] && printf 'checked') id="rd_wplay">
34       <label for="rd_wplay">in embedded player</label><br>
35       <input type="radio" name="watch" value="server"   $([ "${_COOKIE[watch]}" = server   ] && printf 'checked') id="rd_wserv">
36       <label for="rd_wserv">on screen connected to server</label><br>
37
38       <input type="checkbox" name="fakemp4" value="yes" $([ "${_COOKIE[fakemp4]}" = yes ] && printf 'checked') id="ck_fakemp4">
39       <label for="ck_fakemp4">Fake .mp4 file ending, even if file is of different type</label>
40     </fieldset>
41
42     <fieldset>
43       <legend>Display:</legend>
44       <label for="n_pagesize">Number of items per page: </label>
45       <input type="number" name="pagesize" value="${pagesize}" id="n_pagesize">
46     </fieldset>
47
48     <input type="hidden" name="referrer" value="$(attribsafe ${REQUEST_URI})">
49     <input type="submit" value="Set Cookie!">
50   </form>
51 EOF
52
53 # vi:set filetype=html: