aboutsummaryrefslogtreecommitdiff
path: root/samples/form1
diff options
context:
space:
mode:
Diffstat (limited to 'samples/form1')
-rwxr-xr-xsamples/form116
1 files changed, 4 insertions, 12 deletions
diff --git a/samples/form1 b/samples/form1
index 38e23649a591..b739196187bc 100755
--- a/samples/form1
+++ b/samples/form1
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Id: form1,v 1.15 2011/10/04 23:36:53 tom Exp $
+# $Id: form1,v 1.18 2020/11/26 00:34:39 tom Exp $
. ./setup-vars
@@ -19,7 +19,7 @@ returncode=0
while test $returncode != 1 && test $returncode != 250
do
exec 3>&1
-value=`$DIALOG --ok-label "Submit" \
+returntext=`$DIALOG --ok-label "Submit" \
--backtitle "$backtitle" "$@" \
--form "Here is a possible piece of a configuration program." \
20 50 0 \
@@ -31,7 +31,7 @@ value=`$DIALOG --ok-label "Submit" \
returncode=$?
exec 3>&-
-show=`echo "$value" |sed -e 's/^/ /'`
+show=`echo "$returntext" |sed -e 's/^/ /'`
case $returncode in
$DIALOG_CANCEL)
@@ -63,16 +63,8 @@ $show" 10 40
echo "Button 3 (Extra) pressed."
exit
;;
- $DIALOG_ERROR)
- echo "ERROR!$value"
- exit
- ;;
- $DIALOG_ESC)
- echo "ESC pressed."
- exit
- ;;
*)
- echo "Return code was $returncode"
+ . ./report-button
exit
;;
esac