1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-11 16:57:23 +01:00

when asking for a CSR country code, give the user a list

This commit is contained in:
Joshua Tauberer
2014-08-21 17:19:22 +00:00
parent 7ea4d33e06
commit 7e8e104964
3 changed files with 273 additions and 9 deletions

View File

@@ -142,3 +142,14 @@ function input_box {
result=$(dialog --stdout --title "$1" --inputbox "$2" 0 0 "$3")
result_code=$?
}
function input_menu {
# input_menu "title" "prompt" "tag item tag item" VARIABLE
# The user's input will be stored in the variable VARIABLE.
# The exit code from dialog will be stored in VARIABLE_EXITCODE.
declare -n result=$4
declare -n result_code=$4_EXITCODE
local IFS=^$'\n'
result=$(dialog --stdout --title "$1" --menu "$2" 0 0 0 $3)
result_code=$?
}