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"'
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]" ] &&\
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"
}