X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fedit_client.sh;fp=templates%2Fedit_client.sh;h=0000000000000000000000000000000000000000;hp=f2c5afb0b1d8d05f89a090c94029056111ec7da6;hb=786c12839c61826d4d06e2a2f62d1a3d8b7ea780;hpb=9231cbd7d1aeecbb95cec390d5c107c8a1e74706 diff --git a/templates/edit_client.sh b/templates/edit_client.sh deleted file mode 100755 index f2c5afb..0000000 --- a/templates/edit_client.sh +++ /dev/null @@ -1,160 +0,0 @@ -# Copyright 2014 - 2016 Paul Hänsch -# -# This file is part of Confetti. -# -# Confetti is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Confetti is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Confetti. If not, see . - -setchecked() { - printf 'checked="checked"' -} -setselected() { - printf 'selected="selected"' -} -check_gen() { - [ "$values[GENDER]" = "$1" ] && setselected -} -check_a() { - egrep -q "^${1}.${id}$" "$_DATA/mappings/attendance" && setchecked -} -teltype() { - cat <<-EOF - - EOF -} - -list_items(){ - item="$1" - placeholder="$2" - [ -n "${values[$item]+x}" ] && printf '

%s

\n' "$(l10n $item)" - for n in "$item" "$item"{0..100}; do - if [ -n "${values[$n]+x}" ]; then - case "$item" in - (ADR|NOTE) - printf '\n' \ - "$item" "$item" "$(htmlsafe ${values[$n]})" - ;; - (TEL) - teltype "${values[${n}_TYPE]}" - printf '\n' \ - "$item" "$item" "$(attribsafe ${values[$n]})" - ;; - (*) - printf '\n' \ - "$item" "$item" "$(attribsafe ${values[$n]})" "$placeholder" - ;; - esac - else - break - fi - done -} - -hi_company="${values[X-HEALTH-INSURANCE+1]}" -hi_number= "${values[X-HEALTH-INSURANCE+2]}" -hi_status= "${values[X-HEALTH-INSURANCE+3]}" - -[ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" - -cat < - -
-

$(l10n N)

- - - - - - - - - $(for n in NICKNAME NICKNAME{0..10}; do - printf %s\\n "${values[$n]+}" - done) - - $(list_items BDAY YYYY-MM-DD) - - $(list_items X-ZACK-JOINDATE YYYY-MM-DD) - $(list_items X-ZACK-LEAVEDATE YYYY-MM-DD) - - $([ -n "$values[SOUND]" ] && printf ' - ' "$values[SOUND]" - ) - ${values[PHOTO]+} - ${values[LOGO]+} -
- -
- $(list_items ADR) -
- -
- $(list_items TEL) - $(list_items EMAIL) - $(list_items IMPP) - $(list_items URL) -
- -
-

$(l10n X-HEALTH-INSURANCE)

- - - - - - -
- -
- $(list_items NOTE) - $(list_items X-CLIENT-REFERRAL) -
- -
- - - - - -
- - -END_HTML