X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=sidebyside;f=cards%2Fwidgets.sh;h=c0ecfb09e5bf78019189325443c320382ab57bca;hb=638d268ba4eff001614d065396572a6d1c03efae;hp=5fbf125b746b06fdc7c58868a2f0ffc5470abef7;hpb=11e258b8e6cf832c96b20648aa8c9ca0288c597f;p=lobster
diff --git a/cards/widgets.sh b/cards/widgets.sh
index 5fbf125..c0ecfb0 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]' \