2 # $Id: inputmenu3,v 1.11 2012/07/01 01:00:34 tom Exp $
4 # "inputmenu1" with defaultitem, help-button and item-help.
8 backtitle="An Example for the use of --inputmenu:"
10 ids=`id|sed -e 's/([^)]*)//g'`
11 uid=`echo "$ids" | sed -e 's/^uid=//' -e 's/ .*//'`
12 gid=`echo "$ids" | sed -e 's/^.* gid=//' -e 's/ .*//'`
18 defaultitem="Username:"
19 while test $returncode != 1 && test $returncode != 250
22 value=`$DIALOG --clear --ok-label "Create" \
23 --backtitle "$backtitle" \
25 --help-label "Script" \
26 --default-item "$defaultitem" \
28 --inputmenu "Originally I designed --inputmenu for a \
29 configuration purpose. Here is a possible piece of a configuration program." \
31 "Username:" "$user" "User login-name" \
32 "UID:" "$uid" "User-ID (number)" \
33 "GID:" "$gid" "Group-ID (number)" \
34 "HOME:" "$home" "User's home-directory" \
43 --backtitle "$backtitle" \
44 --yesno "Really quit?" 10 30
63 --backtitle "$backtitle" \
77 tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
78 item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
97 test -n "$tag" && defaultitem="$tag"