mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
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.
This commit is contained in:
parent
3196cddc5d
commit
edc6918e0b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=251543
@ -483,12 +483,13 @@ f_dialog_input_expire_password()
|
|||||||
#
|
#
|
||||||
# Loop until the user provides taint-free/cancellation-free input
|
# Loop until the user provides taint-free/cancellation-free input
|
||||||
#
|
#
|
||||||
local date_type
|
local date_type defaultitem=
|
||||||
while :; do
|
while :; do
|
||||||
date_type=$( eval $DIALOG \
|
date_type=$( eval $DIALOG \
|
||||||
--title \"\$DIALOG_TITLE\" \
|
--title \"\$DIALOG_TITLE\" \
|
||||||
--backtitle \"\$DIALOG_BACKTITLE\" \
|
--backtitle \"\$DIALOG_BACKTITLE\" \
|
||||||
--hline \"\$hline\" \
|
--hline \"\$hline\" \
|
||||||
|
--default-item \"\$defaultitem\" \
|
||||||
--ok-label \"\$msg_ok\" \
|
--ok-label \"\$msg_ok\" \
|
||||||
--cancel-label \"\$msg_cancel\" \
|
--cancel-label \"\$msg_cancel\" \
|
||||||
--menu \"\$prompt\" \
|
--menu \"\$prompt\" \
|
||||||
@ -498,6 +499,7 @@ f_dialog_input_expire_password()
|
|||||||
)
|
)
|
||||||
retval=$?
|
retval=$?
|
||||||
f_dialog_data_sanitize date_type
|
f_dialog_data_sanitize date_type
|
||||||
|
defaultitem="$date_type"
|
||||||
f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
|
f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
|
||||||
|
|
||||||
# Return if user has either pressed ESC or chosen Cancel/No
|
# 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
|
# Loop until the user provides taint-free/cancellation-free input
|
||||||
#
|
#
|
||||||
local date_type
|
local date_type defaultitem=
|
||||||
while :; do
|
while :; do
|
||||||
date_type=$( eval $DIALOG \
|
date_type=$( eval $DIALOG \
|
||||||
--title \"\$DIALOG_TITLE\" \
|
--title \"\$DIALOG_TITLE\" \
|
||||||
--backtitle \"\$DIALOG_BACKTITLE\" \
|
--backtitle \"\$DIALOG_BACKTITLE\" \
|
||||||
--hline \"\$hline\" \
|
--hline \"\$hline\" \
|
||||||
|
--default-item \"\$defaultitem\" \
|
||||||
--ok-label \"\$msg_ok\" \
|
--ok-label \"\$msg_ok\" \
|
||||||
--cancel-label \"\$msg_cancel\" \
|
--cancel-label \"\$msg_cancel\" \
|
||||||
--menu \"\$prompt\" \
|
--menu \"\$prompt\" \
|
||||||
@ -681,6 +684,7 @@ f_dialog_input_expire_account()
|
|||||||
)
|
)
|
||||||
retval=$?
|
retval=$?
|
||||||
f_dialog_data_sanitize date_type
|
f_dialog_data_sanitize date_type
|
||||||
|
defaultitem="$date_type"
|
||||||
f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
|
f_dprintf "retval=%u date_type=[%s]" $retval "$date_type"
|
||||||
|
|
||||||
# Return if user has either pressed ESC or chosen Cancel/No
|
# Return if user has either pressed ESC or chosen Cancel/No
|
||||||
|
Loading…
Reference in New Issue
Block a user