drop pasted card info from course functions
authorPaul Hänsch <paul@plutz.net>
Sun, 8 Dec 2019 22:25:05 +0000 (23:25 +0100)
committerPaul Hänsch <paul@plutz.net>
Sun, 8 Dec 2019 22:25:05 +0000 (23:25 +0100)
courses/list.sh

index aeafc8b..abf3bf9 100755 (executable)
@@ -15,59 +15,6 @@ edit_card(){
     cat <<-EOF
        [form .course #${coursefile##*/} action="/cards/update_course.sh" method="POST"
          [input type="hidden" name="tid" value="$(transid ${tempfile})"]
-         [div .section .basic $(
-           edit_item "$course" N GENDER
-           [ "$(pdi_count "$course" NICKNAME)" -gt 0 ] \
-           && edit_item "$card" NICKNAME
-           edit_item "$card" BDAY
-           edit_item "$card" X-ZACK-JOINDATE
-           [ "$(pdi_count "$card" X-ZACK-LEAVEDATE)" -gt 0 ] \
-           && edit_item "$card" X-ZACK-LEAVEDATE
-           card_item "$card" SOUND PHOTO LOGO
-         )]
-         [div .section .phone   $(edit_item "$card" TEL)]
-         [div .section .message $(
-           edit_item "$card" EMAIL
-           [ $(pdi_count "$card" IMPP) -gt 0 ] && edit_item "$card" IMPP
-           [ $(pdi_count "$card" URL ) -gt 0 ] && edit_item "$card" URL
-         )]
-         [div .section .address $(edit_item "$card" ADR)]
-         [div .section .note    $(edit_item "$card" NOTE)]
-         [div .section .attendance
-           [h3 $(l10n course_attendance) ] $(
-           for course in "$_DATA"/ical/*.ics; do
-             printf '[label [input type="checkbox" name="attendance" value="%s" %s] %s]' \
-                    "${course##*/}" \
-                    "$(grep -qF "${course##*/} ${cardfile##*/}" "$_DATA/mappings/attendance" \
-                       && printf 'checked="checked"'
-                    )" \
-                    "$(pdi_value "$(pdi_load "$course")" SUMMARY |unescape |HTML)"
-           done)
-           [h3 $(l10n CATEGORIES) ] $(
-           grep -xE '[^ ]+' "$_DATA"/mappings/categories |while read -r cat; do
-             printf '[label [input type="checkbox" name="attendance" value="%s" %s] %s]' \
-                    "$(HTML "$cat")" \
-                    "$(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)
-         ]
-         [div .control
-           [select .item name="newfield"
-             [option value="" disabled="disabled" selected="selected" $(l10n edit_addfieldtext)]
-             $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE; do
-               printf '[option value="%s" %s] ' "$f" "$(l10n "$f")"
-             done)
-          ][button .item type="submit" name="action" value="addfield" $(l10n edit_addfield)]
-           [button .item type="submit" name="action" value="update"   $(l10n edit_update)]
-           [input type="checkbox" #delete] [label .item for="delete" $(l10n edit_delete)]
-             [button .item type="submit" name="action" value="delete"]
-           [button .item type="submit" name="action" value="cancel"   $(l10n edit_cancel)]
-         ]
-         [input type="hidden" name="UID" value="$(pdi_value "$card" UID |HTML)"]
-         [input type="hidden" name="card" value="${cardfile##*/}"]
        ]
        EOF
   fi