[div .section .address $(edit_item "$card" ADR)]
[div .section .note $(edit_item "$card" NOTE)]
[div .section .attendance
- [h3 $(l10n course_attendance) ] $(
+ [h3 $(l10n course_attendance) ] [div .attendance $(
list_courses |while IFS=/ read course coursename; do
- printf '[label [input type="checkbox" name="attendance" value="%s" %s] %s]' \
- "$(HTML "$course")" \
+ courseH="$(HTML "$course")"
+ printf '[input type="checkbox" id="cour%s" name="attendance" value="%s" %s][label for="cour%s" . %s]' \
+ "$courseH" "$courseH" \
"$(grep -qF "${course} ${cardfile##*/}" "$_DATA/mappings/attendance" \
&& printf 'checked="checked"'
)" \
- "$coursename"
- done)
- [h3 $(l10n CATEGORIES) ] $(
+ "$courseH" "$coursename"
+ done)]
+ [h3 $(l10n CATEGORIES) ] [div .categories $(
grep -xE '[^ ]+' "$_DATA"/mappings/categories |while read -r cat; do
- printf '[label [input type="checkbox" name="CATEGORIES" value="%s" %s] %s]' \
- "$(HTML "$cat")" \
+ catH="$(HTML "$cat")"
+ printf '[input type="checkbox" id="cat%s" name="CATEGORIES" value="%s" %s][label for="cat%s" . %s]' \
+ "$catH" "$catH" \
"$(seq 1 $(pdi_count "$card" CATEGORIES) |while read c; do
pdi_value "$card" CATEGORIES $c |grep -qxF "$cat" \
&& printf 'checked="checked"' && break
done)" \
- "$(HTML "$cat")"
- done)
+ "$catH" "$catH"
+ done)]
]
[div .control
[div .item .delete label="$(l10n edit_delete)"
form .control .item.delete { bottom: .125em; right: .25em; }
}
+
+/* ======= LIST ITEMS, Cards ======= */
+
+form.card .attendance div.attendance,
+form.card .attendance div.categories {
+ max-height: 10em;
+ overflow-y: auto;
+}
+form.card .attendance label {
+ display: inline-block;
+ width: calc(100% - 2em);
+ vertical-align: top;
+ margin-bottom: 0;
+}
+form.card .attendance input { margin-top: .375em; }
+
+
/* ======= LIST ITEMS, Courses ======= */
form.course .dtstart input[name=DTS_YEAR],