done
fi
;;
+ TEL) if [ $cnt -gt 0 ]; then
+ printf '[h3 %s]' "$(l10n TEL)"
+ seq 1 $cnt |while read c; do
+ teltype="$(pdi_attrib "$card" TEL $c TYPE)"
+ [ "$teltype" ] \
+ && printf '[span .item .TEL [span .type ­%s:] %s]' \
+ "$(l10n "$teltype" |HTML)" \
+ "$(pdi_value "$card" TEL $c |unescape |HTML)" \
+ || printf '[span .item .TEL ­%s]' \
+ "$(pdi_value "$card" TEL $c |unescape |HTML)"
+ done
+ fi
+ ;;
*) if [ $cnt -gt 0 ]; then
printf '[h3 %s]' "$(l10n "$item")"
seq 1 $cnt |while read c; do
"$(l10n n_post)" "$(HTML "$n5")"
;;
GENDER)
+ gender="$(pdi_value "$card" GENDER)"
printf '
[select .item .GENDER name="GENDER"
[option value="" disabled="disabled" %s %s]
[option value="male" %s %s]
[option value="other" %s %s]
[option value="none" %s %s]
- ]
- ' \
- "$([ "$(pdi_value "$card" GENDER)" = '' ] && printf 'selected="selected"')" \
- "$(l10n GENDER)" \
- "$([ "$(pdi_value "$card" GENDER)" = 'female' ] && printf 'selected="selected"')" \
- "$(l10n gender_female)" \
- "$([ "$(pdi_value "$card" GENDER)" = 'male' ] && printf 'selected="selected"')" \
- "$(l10n gender_male)" \
- "$([ "$(pdi_value "$card" GENDER)" = 'other' ] && printf 'selected="selected"')" \
- "$(l10n gender_other)" \
- "$([ "$(pdi_value "$card" GENDER)" = 'none' ] && printf 'selected="selected"')" \
- "$(l10n gender_none)"
+ ]\n' \
+ "$([ "$gender" = '' ] && printf 'selected="selected"')" "$(l10n GENDER)" \
+ "$([ "$gender" = 'female' ] && printf 'selected="selected"')" "$(l10n gender_female)" \
+ "$([ "$gender" = 'male' ] && printf 'selected="selected"')" "$(l10n gender_male)" \
+ "$([ "$gender" = 'other' ] && printf 'selected="selected"')" "$(l10n gender_other)" \
+ "$([ "$gender" = 'none' ] && printf 'selected="selected"')" "$(l10n gender_none)"
;;
BDAY|X-ZACK-JOINDATE|X-ZACK-LEAVEDATE)
printf '[h3 %s]
"$item" "$item" "$(pdi_value "$card" "$item" $c |unescape |HTML)"
done
;;
+ TEL) printf '[h3 %s]' "$(l10n "$item")"
+ seq 1 $cnt |while read c; do
+ teltype="$(pdi_attrib "$card" TEL $c TYPE)"
+ printf '[select .item .teltype name="teltype"
+ [option value="" disabled="disabled" %s %s]
+ [option value="HOME" %s %s]
+ [option value="WORK" %s %s]
+ [option value="CELL" %s %s]
+ [option value="FAX" %s %s]
+ ]\n' \
+ "$([ "$teltype" = '' ] && printf 'selected="selected"')" "$(l10n teltype)" \
+ "$([ "$teltype" = 'HOME' ] && printf 'selected="selected"')" "$(l10n HOME)" \
+ "$([ "$teltype" = 'WORK' ] && printf 'selected="selected"')" "$(l10n WORK)" \
+ "$([ "$teltype" = 'CELL' ] && printf 'selected="selected"')" "$(l10n CELL)" \
+ "$([ "$teltype" = 'FAX' ] && printf 'selected="selected"')" "$(l10n FAX)"
+
+ printf '[input .item .%s name="%s" value="%s" placeholder="%s"]' \
+ "$item" "$item" "$(pdi_value "$card" "$item" $c |unescape |HTML)" "$(l10n "$item")"
+ done
+ ;;
*) printf '[h3 %s]' "$(l10n "$item")"
seq 1 $cnt |while read c; do
printf '[input .item .%s name="%s" value="%s" placeholder="%s"]' \