]> git.plutz.net Git - lobster/commitdiff
recording of attendees gender
authorpaul <paul@plutz.net>
Fri, 6 Dec 2013 18:02:58 +0000 (18:02 +0000)
committerpaul <paul@plutz.net>
Fri, 6 Dec 2013 18:02:58 +0000 (18:02 +0000)
svn path=/trunk/; revision=37

templates/edit_attendee.sh
templates/text_attendee.sh

index 357e2bfaccad22f293519093ddbd09422403cd23..3fd109afaff844bef2cbc62218595036b6072d81 100755 (executable)
@@ -1,5 +1,5 @@
 check_gen() {
-  [ "$value[GENDER]" = "$1" ] && echo 'selected="selected"'
+  [ "$values[GENDER]" = "$1" ] && echo 'selected="selected"'
 }
 check_a() {
   egrep -q "^${1}.${id}$" "$_DATA/mappings/attendance" && echo 'checked="checked"'
@@ -25,13 +25,13 @@ echo '    <input class="item N" name="1N" placeholder="'$(l10n n_first)'" value=
 echo '    <input class="item N" name="2N" placeholder="'$(l10n n_middle)'" value="'$n_middle'" />'
 echo '    <input class="item N" name="0N" placeholder="'$(l10n n_last)'" value="'$n_last'" />'
 echo '    <input class="item N" name="4N" placeholder="'$(l10n n_post)'" value="'$n_post'" />'
-if [ -n "$value[GENDER]" ]; then
-  echo '  <div class="section control">'
-  echo '    <select class="item control" name="newfield">'
+if [ -n "$values[GENDER]" ]; then
+  echo '    <select class="item GENDER" name="GENDER">'
   echo '      <option value="" disabled="disabled">'$(l10n GENDER)'</option>'
-  echo '      <option value="female" disabled="disabled" '$(check_gen female)'>'$(l10n female)'</option>'
-  echo '      <option value="male" disabled="disabled"  '$(check_gen male)'>'$(l10n male)'</option>'
-  echo '      <option value="other" disabled="disabled" '$(check_gen other)'>'$(l10n gender_other)'</option>'
+  echo '      <option value="female" '$(check_gen female)'>'$(l10n gender_female)'</option>'
+  echo '      <option value="male" '$(check_gen male)'>'$(l10n gender_male)'</option>'
+  echo '      <option value="other" '$(check_gen other)'>'$(l10n gender_other)'</option>'
+  echo '      <option value="none" '$(check_gen none)'>'$(l10n gender_none)'</option>'
   echo '    </select>'
 fi
 for n in NICKNAME NICKNAME{0..10}; do [ -n "$values[$n]" ] &&\
index 132cc4262225db9ca8ebf7bea50907ce052adfe7..57ad3f62add19c6aab8365a938a7ad9d901add34 100755 (executable)
@@ -78,6 +78,11 @@ item_name[filter_cancel]="Filter löschen"
 item_name[newcard]="Neuen Eintrag anlegen"
 item_name[course_attendance]="Kursteilnahme"
 
+item_name[gender_none]="keine Angabe"
+item_name[gender_female]="Weiblich"
+item_name[gender_male]="Männlich"
+item_name[gender_other]="Sonstiges"
+
 l10n() {
   [ -n "$item_name[$1]" ] && echo -n "$item_name[$1]" || echo -n "$1"
 }