]> git.plutz.net Git - serve0/blobdiff - templates/preferences.html.sh
styling for pagination links
[serve0] / templates / preferences.html.sh
index bf87ae39ce44258ce232913e3f1d68629816b6b5..dccb6122b67343138c315d1462b6085acefa95a0 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2015 Paul Hänsch
+# Copyright 2015, 2016, 2018 Paul Hänsch
 #
 # This file is part of Serve0
 # 
 # along with Serve0  If not, see <http://www.gnu.org/licenses/>. 
 
 cat <<EOF
-  <form class="panel footer" id="preferences"
+  <form class="panel switchable top" id="preferences"
    action="?action=preferences" method="post" accept-charset="UTF-8">
-    <a class="panel hide" href="#foot">Hide</a>
+    <a class="panel toggle" href="#">Hide</a>
 
-    <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>
+      <legend>Watch videos:</legend>
+      $(form_radio watch 240p     "${_COOKIE[watch]}" "as Download in 240p"   )<br/>
+      $(form_radio watch 480p     "${_COOKIE[watch]}" "as Download in 480p"   )<br/>
+      $(form_radio watch download "${_COOKIE[watch]}" "as Download (original)")<br/>
+      $(form_radio watch raspi    "${_COOKIE[watch]}" "on playback device"    )<br/>
+      $(form_radio watch player   "${_COOKIE[watch]}" "in embedded player"    )<br/>
+      $(form_radio watch server   "${_COOKIE[watch]}" "on screen connected to server")<br/>
 
-    <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>
+      $(form_check fakemp4 yes "${_COOKIE[fakemp4]}" "Fake .mp4 file ending, even if file is of different type")
+    </fieldset>
 
+    <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="hidden" name="referrer" value="$(attribsafe ${REQUEST_URI})">
     <input type="submit" value="Set Cookie!">
   </form>
 EOF