-# Copyright 2014 - 2019 Paul Hänsch
+# Copyright 2014 - 2019, 2021 Paul Hänsch
#
# This file is part of Confetti.
#
[legend $(l10n filter_item):]
$(for field in any name street zip TEL BDAY CATEGORIES; do
- printf '[input id="%s%i" type="radio" name="filter_type%i" value="%s" %s]
- [label for="%s%i" %s ]' \
+ printf '[input id="%s%i" type="radio" name="filter_type%i" value="%s" %s][label for="%s%i" %s ]' \
"$field" "$n" "$n" "$field" "$([ "$1" = "$field" ] && printf checked )" \
"$field" "$n" "$(l10n filter_$field)"
done)
"$(printf %s "$cat" |grep -qxEe "$2" && printf checked )" \
"$(HTML "$cat")"
done)
- [a href="/cards/categories.sh" $(l10n edit_categories)]
+ [a href="/categories/" $(l10n edit_categories)]
]
]
EOF
w_filter_item "${fil%%:*}" "${fil#*:}" $n
n=$((n + 1))
done
- w_filter_item any '' $n
+ [ "$n" -eq 0 -o "$(GET newfilter)" ] && w_filter_item any '' $n
)
-
+ [button type="submit" name="choice" value="new_filter" $(l10n filter_more)]
[fieldset class="order"
[legend $(l10n filter_order):]
[label [radio "order" "firstname" $( [ "$order" = firstname ] && printf checked )] $(l10n filter_firstname)]
[label [radio "order" "lastname" $( [ "$order" = lastname ] && printf checked )] $(l10n filter_lastname)]
[label [radio "order" "bdate" $( [ "$order" = bdate ] && printf checked )] $(l10n filter_bdate)]
]
- [button type="submit" name="choice" value="new_filter" $(l10n filter_apply)]
+ [button type="submit" name="choice" value="filter" $(l10n filter_apply)]
[button type="submit" name="choice" value="del_filter" $(l10n filter_cancel)]
]
EOF
cnt="$(pdi_count "$card" "$item")"
case $item in
- FN) printf '[h2 .item .FN ­%s]' "$(pdi_value "$card" FN |unescape |HTML)"
+ FN) printf '[h2 .item .FN . %s]' "$(pdi_value "$card" FN |unescape |HTML)"
;;
- GENDER) printf '[span .item .GENDER ­%s]' "$(pdi_value "$card" GENDER |l10n)"
+ GENDER) printf '[span .item .GENDER . %s]' "$(pdi_value "$card" GENDER |l10n)"
;;
NICKNAME) seq 1 $cnt |while read c; do
- printf '[span .item .NICKNAME ­aka. "%s"]' \
+ printf '[span .item .NICKNAME . aka. "%s"]' \
"$(pdi_value "$card" NICKNAME $c |unescape |HTML)"
done
;;
EMAIL)
[ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n EMAIL)"
seq 1 $cnt |while read c; do
- printf '[a .item .EMAIL href="mailto:%s" ­%s]' \
+ printf '[a .item .EMAIL href="mailto:%s" . %s]' \
"$(pdi_value "$card" EMAIL $c |unescape |HTML)" \
"$(pdi_value "$card" EMAIL $c |unescape |HTML)"
done
seq 1 $cnt |while read c; do
teltype="$(pdi_attrib "$card" TEL $c TYPE)"
[ "$teltype" ] \
- && printf '[span .item .TEL [span .type ­%s:] %s]' \
+ && printf '[span .item .TEL [span .type . %s:] %s]' \
"$(l10n "TYPE=$teltype" |HTML)" \
"$(pdi_value "$card" TEL $c |unescape |HTML)" \
- || printf '[span .item .TEL ­%s]' \
+ || printf '[span .item .TEL . %s]' \
"$(pdi_value "$card" TEL $c |unescape |HTML)"
done
;;
*)[ $cnt -gt 0 ] && printf '[h3 %s]' "$(l10n "$item")"
seq 1 $cnt |while read c; do
- printf '[span .item .%s ­%s]' "$item" \
+ printf '[span .item .%s . %s]' "$item" \
"$(pdi_value "$card" "$item" $c |unescape |HTML)"
done
;;