]> git.plutz.net Git - serve0/blobdiff - templates/preferences.html.sh
introduced page size cookie; globalised some input validation
[serve0] / templates / preferences.html.sh
index ee0e8be3fd94ef35b250957dbcbceecda98f738a..49e6c7f89a5816fc7961106f437f635b1f23b23b 100755 (executable)
 cat <<EOF
   <form class="panel footer" id="preferences"
    action="?action=preferences" method="post" accept-charset="UTF-8">
+    <fieldset>
+      <legend>Watch videos:</legend>
+      <input type="radio" name="watch" value="240p"     $([ "${_COOKIE[watch]}" = 240p     ] && printf 'checked') id="rd_w240p">
+      <label for="rd_w240p">as Download in 240p</label><br>
+      <input type="radio" name="watch" value="480p"     $([ "${_COOKIE[watch]}" = 480p     ] && printf 'checked') id="rd_w480p">
+      <label for="rd_w480p">as Download in 480p</label><br>
+      <input type="radio" name="watch" value="download" $([ "${_COOKIE[watch]}" = download ] && printf 'checked') id="rd_wdown">
+      <label for="rd_wdown">as Download (original)</label><br>
+      <input type="radio" name="watch" value="raspi"    $([ "${_COOKIE[watch]}" = raspi    ] && printf 'checked') id="rd_wrasp">
+      <label for="rd_wrasp">on RaspBerry</label><br>
+      <input type="radio" name="watch" value="player"   $([ "${_COOKIE[watch]}" = player   ] && printf 'checked') id="rd_wplay">
+      <label for="rd_wplay">in embedded player</label><br>
+      <input type="radio" name="watch" value="server"   $([ "${_COOKIE[watch]}" = server   ] && printf 'checked') id="rd_wserv">
+      <label for="rd_wserv">on screen connected to server</label><br>
 
-    <input type="checkbox" name="fakemp4" value="yes" $([ "${_COOKIE[fakemp4]}" = yes ] && printf 'checked') id="ck_fakemp4">
-    <label for="ck_fakemp4">Fake .mp4 file ending, even if file is of different type</label>
+      <input type="checkbox" name="fakemp4" value="yes" $([ "${_COOKIE[fakemp4]}" = yes ] && printf 'checked') id="ck_fakemp4">
+      <label for="ck_fakemp4">Fake .mp4 file ending, even if file is of different type</label>
+    </fieldset>
 
-    <h2>Watch videos:</h2>
-    <input type="radio" name="watch" value="240p"     $([ "${_COOKIE[watch]}" = 240p     ] && printf 'checked') id="rd_w240p">
-    <label for="rd_w240p">as Download in 240p</label><br>
-    <input type="radio" name="watch" value="480p"     $([ "${_COOKIE[watch]}" = 480p     ] && printf 'checked') id="rd_w480p">
-    <label for="rd_w480p">as Download in 480p</label><br>
-    <input type="radio" name="watch" value="download" $([ "${_COOKIE[watch]}" = download ] && printf 'checked') id="rd_wdown">
-    <label for="rd_wdown">as Download (original)</label><br>
-    <input type="radio" name="watch" value="raspi"    $([ "${_COOKIE[watch]}" = raspi    ] && printf 'checked') id="rd_wrasp">
-    <label for="rd_wrasp">on RaspBerry</label><br>
-    <input type="radio" name="watch" value="player"   $([ "${_COOKIE[watch]}" = player   ] && printf 'checked') id="rd_wplay">
-    <label for="rd_wplay">in embedded player</label><br>
-    <input type="radio" name="watch" value="server"   $([ "${_COOKIE[watch]}" = server   ] && printf 'checked') id="rd_wserv">
-    <label for="rd_wserv">on screen connected to server</label><br>
+    <fieldset>
+      <legend>Display:</legend>
+      <label for="n_pagesize">Number of items per page: </label>
+      <input type="number" name="pagesize" value="${pagesize}" id="n_pagesize">
+    </fieldset>
 
     <input type="submit" value="Set Cookie!">