2 # $Id: form5,v 1.6 2010/01/13 10:49:52 tom Exp $
3 # form4 with --help-status
7 backtitle="An Example for the use of --form:"
9 ids=`id|sed -e 's/([^)]*)//g'`
10 uid=`echo "$ids" | sed -e 's/^uid=//' -e 's/ .*//'`
11 gid=`echo "$ids" | sed -e 's/^.* gid=//' -e 's/ .*//'`
17 while test $returncode != 1 && test $returncode != 250
20 value=`$DIALOG --ok-label "Submit" \
24 --backtitle "$backtitle" "$@" \
25 --form "Here is a possible piece of a configuration program." \
27 "Username:" 1 1 "$user" 1 10 10 0 "Login name" \
28 "UID:" 2 1 "$uid" 2 10 8 0 "User ID" \
29 "GID:" 3 1 "$gid" 3 10 8 0 "Group ID" \
30 "HOME:" 4 1 "$home" 4 10 40 0 "User's home-directory" \
35 show=`echo "$value" |sed -e 's/^/ /'`
41 --backtitle "$backtitle" \
42 --yesno "Really quit?" 10 30
55 --backtitle "$backtitle" --no-collapse --cr-wrap \
56 --msgbox "Resulting data:\n\
62 --backtitle "$backtitle" --no-collapse --cr-wrap \
63 --msgbox "Help data:\n\
67 echo "Return code was $returncode"