]> git.plutz.net Git - confetti/blobdiff - templates/edit_course.sh
adaption for changes in shcgi external
[confetti] / templates / edit_course.sh
index 67e051173189afd5856258a9811ac36c27fb2911..c1deb5a622f0fa85673b8005071408871e4667f4 100755 (executable)
@@ -83,18 +83,17 @@ done
 echo '    </select>'
 echo '    <button class="DTS" type="submit" name="DTS" value="update">'$(l10n edit_dtscal)'</button>'
 for wd in mon tue wed thu fri sat sun; do
 echo '    </select>'
 echo '    <button class="DTS" type="submit" name="DTS" value="update">'$(l10n edit_dtscal)'</button>'
 for wd in mon tue wed thu fri sat sun; do
-  echo '    <span class="DTSCALHEAD">'$(date -d $wd +%a)'</span>'
+  echo -n '<span class="DTSCALHEAD">'$(date -d $wd +%a)'</span>'
 done
 fdom=$(date -d ${dts_year}-${dts_month}-1 +%u)
 while [ "$fdom" -gt 1 ]; do
 done
 fdom=$(date -d ${dts_year}-${dts_month}-1 +%u)
 while [ "$fdom" -gt 1 ]; do
-  echo '    <span class="DTSCAL"></span>'
+  echo -n '<span class="DTSCAL"></span>'
   fdom=$(($fdom - 1))
 done
   fdom=$(($fdom - 1))
 done
-echo '<input type="hidden" name="DTSDAY" value="'$dts_dom'">'
 cnt=$(date -d ${dts_year}-${dts_month}-1 +%s)
 while [ "$(date -d @$cnt +%m)" = "$dts_month" ]; do
   dn=$(date -d @$cnt +%d)
 cnt=$(date -d ${dts_year}-${dts_month}-1 +%s)
 while [ "$(date -d @$cnt +%m)" = "$dts_month" ]; do
   dn=$(date -d @$cnt +%d)
-  echo '    <button class="DTSCAL '$( [ $dn = $dts_dom ] && echo selected)'" type="submit" name="DTSDAY" value="'$dn'">'$dn'</button>'
+  echo -n '<input type="radio" class="DTSCAL" name="DTSDAY" value="'$dn'" id="DTSCAL_'$dn'" '$([ $dn = $dts_dom ] && echo checked)'><label for="DTSCAL_'$dn'" class="DTSCAL">'$dn'</label>'
   cnt=$(($cnt + 86400))
 done
 echo '    <br />'
   cnt=$(($cnt + 86400))
 done
 echo '    <br />'