# (TEL)
# printf '%s;TYPE=%s:%s\r\n' "${field}" "${_POST[phonetype${key#TEL}]}" "$(vcf_escape "$(POST "$field" "$cnt")")"
# ;;
+ X-HEALTH-INSURANCE)
+ hi_select="$(POST "$field" "$cnt")"
+ if [ "$hi_select" = list ]; then
+ vcf="$(pdi_update_value "$vcf" "$field" "$cnt" "$(vcf_escape "$(POST "hi_company" "$cnt")" \
+ "$(POST "hi_number" "$cnt")" \
+ "$(POST "hi_status" "$cnt")" \
+ )")"
+ elif [ "$hi_select" = other ]; then
+ vcf="$(pdi_update_value "$vcf" "$field" "$cnt" "$(vcf_escape "$(POST "hi_other" "$cnt")" \
+ "$(POST "hi_number" "$cnt")" \
+ "$(POST "hi_status" "$cnt")" \
+ )")"
+ fi
+ ;;
TEL)
vcf="$(pdi_update_attrib "$vcf" TEL $cnt TYPE="$(POST teltype $cnt |grep -Exm1 'HOME|WORK|CELL|FAX')")"
vcf="$(pdi_update_value "$vcf" "$field" "$cnt" "$(vcf_escape "$(POST "$field" "$cnt")")")"
done
printf '[button type="submit" name="action" value="addfield %s" %s ]' "$item" "$(l10n edit_addfield)"
;;
+ X-HEALTH-INSURANCE)
+ printf '[h3 %s]' "$(l10n "$item")"
+ seq 1 $cnt |while read c; do
+ # printf '[checkbox "%s_delete_%i" "true" .delete #%s_delete_%i][label for="%s_delete_%i" %s]' \
+ # "$item" $c "$item" $c "$item" $c "$(l10n delete)"
+ IFS=\; read -r hi_name hi_number hi_status <<-EOF
+ $(pdi_value "$card" X-HEALTH-INSURANCE $c)
+ EOF
+ cat <<-EOF
+ [input type="radio" name="$item" value="list" #hi_select_list checked]<!--
+ -->[label for="hi_select_list" $(l10n hi_from_list)]<!--
+ -->[input type="radio" name="$item" value="other" #hi_other checked]<!--
+ -->[label for="hi_other" $(l10n hi_other)]<!--
+ -->[select class="item" name="hi_company"
+ [option value="" disabled="disabled" $(selected "${hi_name}" "") . $(l10n hi_company)]
+ $(list_hi_companies |while read f; do
+ printf '[option value="%s" %s . %s]' "$(unescape "$f" |HTML)" \
+ "$(selected "$f" "$hi_name")" \
+ "$(unescape "$f" |HTML)"
+ done)
+ ]
+ [input type="text" name="hi_other" value="$hi_name" placeholder="$(l10n hi_company)"]
+ [input name="hi_number" value="$(unescape "$hi_number" |HTML)" placeholder="$(l10n hi_number)"]
+ [input name="hi_status" value="$(unescape "$hi_status" |HTML)" placeholder="$(l10n hi_status)"]
+ EOF
+ done
+ ;;
*)printf '[h3 %s]' "$(l10n "$item")"
seq 1 $cnt |while read c; do
printf '[checkbox "%s_delete_%i" "true" .delete #%s_delete_%i][label for="%s_delete_%i" %s]' \