]> git.plutz.net Git - serve0/commitdiff
make use of new shcgi form functions
authorpaul <paul@plutz.net>
Sat, 12 May 2018 23:51:05 +0000 (23:51 +0000)
committerpaul <paul@plutz.net>
Sat, 12 May 2018 23:51:05 +0000 (23:51 +0000)
svn path=/trunk/; revision=196

templates/preferences.html.sh

index ab1cb8b6108617de598dc865f0a37fa7115221d1..dccb6122b67343138c315d1462b6085acefa95a0 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2015, 2016 Paul Hänsch
+# Copyright 2015, 2016, 2018 Paul Hänsch
 #
 # This file is part of Serve0
 # 
@@ -22,21 +22,14 @@ cat <<EOF
 
     <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>
+      $(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/>
 
-      <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>
+      $(form_check fakemp4 yes "${_COOKIE[fakemp4]}" "Fake .mp4 file ending, even if file is of different type")
     </fieldset>
 
     <fieldset>