]> git.plutz.net Git - confetti/commitdiff
enable IBAN field in card
authorPaul Hänsch <paul@plutz.net>
Fri, 19 Apr 2024 00:01:08 +0000 (02:01 +0200)
committerPaul Hänsch <paul@plutz.net>
Fri, 19 Apr 2024 00:01:08 +0000 (02:01 +0200)
cards/l10n.sh
cards/list.sh
cards/update_card.sh

index 2d9dc06362d250a5719f378aa0e9ef8a61867bee..fde98e07350659d4e8a938c0175e03c9994bcbbf 100755 (executable)
@@ -37,6 +37,7 @@ l10n(){
     X-ZACK-LEAVEDATE) printf %s "Abmelde&shy;datum";;
     X-ZACK-JOINDATE_short)  printf %s "Anm.";;
     X-ZACK-LEAVEDATE_short) printf %s "Abm.";;
+    X-IBAN) printf %s "IBAN";;
 
     *) l10n_global "$word";;
   esac
index 519005c08f780bc5e09dc64717fa72bd46425482..9511fc1d015001a1dbdb2cf9a92dde6e84ed8be1 100755 (executable)
@@ -31,7 +31,10 @@ edit_card(){
            [ $(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 .address $(
+           edit_item "$card" ADR
+           [ $(pdi_count "$card" X-IBAN) -gt 0 ] && edit_item "$card" X-IBAN
+         )]
          [div .section .note    $(edit_item "$card" NOTE)]
          [div .section .attendance
            [h3 $(l10n course_attendance) ] [div .attendance $(
@@ -65,7 +68,7 @@ edit_card(){
             [div .item .newfield
               [select name="newfield"
                [option value="" disabled="disabled" selected="selected" $(l10n edit_addfieldtext)]
-               $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE X-ZACK-LEAVEDATE; do
+               $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE X-ZACK-LEAVEDATE X-IBAN; do
                  printf '[option value="%s" %s] ' "$f" "$(l10n "$f")"
                done)
              ][button type="submit" name="action" value="addfield" $(l10n edit_addfield)]
@@ -90,7 +93,7 @@ print_card(){
       )]
       [div .section .phone   . $(card_item "$card" TEL)]
       [div .section .message . $(card_item "$card" EMAIL IMPP URL)]
-      [div .section .address . $(card_item "$card" ADR)]
+      [div .section .address . $(card_item "$card" ADR X-IBAN)]
       [div .section .note    . $(card_item "$card" NOTE)]
       [div .section .attendance [h3 $(l10n course_attendance) ] [ul
         $(grep -F "    ${cardfile##*/}" "$_DATA/mappings/attendance" |while read each discard; do
index 2b87632aea3208def628e80226996b32e1eb171b..d57f5030a2431c564891d716c7f7a8ff5d769755 100755 (executable)
@@ -35,7 +35,7 @@ attfile="$_DATA/mappings/attendance"
 action="$(POST action)"
 newfield="$(POST newfield |grep -m 1 -xE '[A-Z][A-Z0-9-]*')"
 
-if printf '%s\n' "$action" |grep -qxE 'addfield [A-Z][A-Z0-9]*'; then
+if printf '%s\n' "$action" |grep -qxE 'addfield [A-Z][A-Z0-9-]*'; then
   newfield="${action##* }"
   action=addfield
 fi