]> git.plutz.net Git - webpoll/blobdiff - newdate.sh
Improved dialog, improved vidual spacing
[webpoll] / newdate.sh
index 32533b8090b17dce35e21e194134e836e437a1bb..b71bdef063fb6679681cebd533222e7ab4e55e73 100755 (executable)
@@ -25,11 +25,13 @@ fs_timeofday() {
 }
 
 fs_splittimes() {
-  local day times time c
+  local days day times time c
+  days="$(DBM "$file" get dates)"
   cat <<-EOF
        [fieldset .splittimes
          [checkbox "none" "none" .splittimes checked disabled=disabled] [submit "splittimes" "no" Separate Time Options per Day]
-         $(for day in $(DBM "$file" get dates); do 
+         $([ ! "$days" ] && printf '[p You have not selected any days yet.]\n')
+         $(for day in $days; do 
             date -d $day +"[h2 . %A - %B %_d, %Y]"
            times=$(DBM "$file" get "tod_$day")
            for time in ${times:--}; do