diff options
author | dteske <dteske@FreeBSD.org> | 2013-06-08 17:46:39 +0000 |
---|---|---|
committer | dteske <dteske@FreeBSD.org> | 2013-06-08 17:46:39 +0000 |
commit | a84a4d50b2e52466c8abf58da72585030f3140f0 (patch) | |
tree | 7843e5f1fbb5fee9d7bc91023c97813db9c7d749 /usr.sbin | |
parent | f088cbc9d3ad84804b8704c9cb8b0af0e102140c (diff) | |
download | FreeBSD-src-a84a4d50b2e52466c8abf58da72585030f3140f0.zip FreeBSD-src-a84a4d50b2e52466c8abf58da72585030f3140f0.tar.gz |
Track defaultitem in the password and account expiry menus; if the user
presses ESC or chooses Cancel/No in any of the sub-menus, we want to return
to the expiry menu with that item selected.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bsdconfig/usermgmt/share/user_input.subr | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr index 74f7fc2..a06f707 100644 --- a/usr.sbin/bsdconfig/usermgmt/share/user_input.subr +++ b/usr.sbin/bsdconfig/usermgmt/share/user_input.subr @@ -483,12 +483,13 @@ f_dialog_input_expire_password() # # Loop until the user provides taint-free/cancellation-free input # - local date_type + local date_type defaultitem= while :; do date_type=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ + --default-item \"\$defaultitem\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" \ @@ -498,6 +499,7 @@ f_dialog_input_expire_password() ) retval=$? f_dialog_data_sanitize date_type + defaultitem="$date_type" f_dprintf "retval=%u date_type=[%s]" $retval "$date_type" # Return if user has either pressed ESC or chosen Cancel/No @@ -666,12 +668,13 @@ f_dialog_input_expire_account() # # Loop until the user provides taint-free/cancellation-free input # - local date_type + local date_type defaultitem= while :; do date_type=$( eval $DIALOG \ --title \"\$DIALOG_TITLE\" \ --backtitle \"\$DIALOG_BACKTITLE\" \ --hline \"\$hline\" \ + --default-item \"\$defaultitem\" \ --ok-label \"\$msg_ok\" \ --cancel-label \"\$msg_cancel\" \ --menu \"\$prompt\" \ @@ -681,6 +684,7 @@ f_dialog_input_expire_account() ) retval=$? f_dialog_data_sanitize date_type + defaultitem="$date_type" f_dprintf "retval=%u date_type=[%s]" $retval "$date_type" # Return if user has either pressed ESC or chosen Cancel/No |