2 # $Id: inputmenu2,v 1.9 2012/07/01 01:00:34 tom Exp $
4 # "inputmenu1" with defaultitem, help-button.
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" "$@" \
27 --inputmenu "Originally I designed --inputmenu for a \
28 configuration purpose. Here is a possible piece of a configuration program." \
46 --backtitle "$backtitle" \
47 --yesno "Really quit?" 10 30
60 --backtitle "$backtitle" \
68 tag=`echo "$value" |sed -e 's/^RENAMED //' -e 's/:.*/:/'`
69 item=`echo "$value" |sed -e 's/^[^:]*:[ ]*//' -e 's/[ ]*$//'`
88 test -n "$tag" && defaultitem="$tag"