X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=cards%2Fwidgets.sh;h=d2ed32611932d5fd9bf7067b904679892f797e69;hb=3dde2397fa3cd53d77f81c3cd6a988138a9b67b4;hp=5fbf125b746b06fdc7c58868a2f0ffc5470abef7;hpb=f685a02e05355cf8016351d1c1ba1413cd44f0c7;p=lobster diff --git a/cards/widgets.sh b/cards/widgets.sh index 5fbf125..d2ed326 100755 --- a/cards/widgets.sh +++ b/cards/widgets.sh @@ -15,32 +15,19 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . -list_categories() { - grep -vxE '^[ ]*$' "${_DATA}/mappings/categories" -} - w_filter_item() { n=$3 cat <[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]' \