- printf '[td [input type=radio id="%s_%s" name="%s" value="%s" %s][label for="%s_%s" . %i]]' \
- "$input" "$date" "$input" "$date" "$(checked $dom $selected)" "$input" "$date" "$dom"
+ case $type in
+ none)
+ printf '[td [label %s . %i]]' \
+ "$(checked $dom $selected)" "$dom"
+ ;;
+ multiple)
+ printf '[td [input type=checkbox id="%s_%s" name="%s" value="%s" %s][label for="%s_%s" . %i]]' \
+ "$input" "$date" "$input" "$date" "$(checked $dom $selected)" "$input" "$date" "$dom"
+ ;;
+ select|*)
+ printf '[td [input type=radio id="%s_%s" name="%s" value="%s" %s][label for="%s_%s" . %i]]' \
+ "$input" "$date" "$input" "$date" "$(checked $dom $selected)" "$input" "$date" "$dom"
+ ;;
+ esac