Wifi menu style

This commit is contained in:
Bob Mottram 2018-03-17 21:45:53 +00:00
parent df1961e553
commit 1464ea0613
1 changed files with 14 additions and 20 deletions

View File

@ -2202,31 +2202,24 @@ function menu_wifi {
fi
fi
data=$(mktemp 2>/dev/null)
dialog --backtitle $"Freedombone Control Panel" \
--title $"Wifi Menu" \
--radiolist $"${status_str}\\n\\nChoose an operation:" 14 70 6 \
1 $"Enable or disable Wifi" off \
2 $"Configure wifi networks" off \
3 $"Manually edit wifi networks file" off \
4 $"Hotspot settings" off \
5 $"Exit" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
break;;
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
W=(1 $"Enable or disable Wifi"
2 $"Configure wifi networks"
3 $"Manually edit wifi networks file"
4 $"Hotspot settings")
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Wifi Menu" --menu $"${status_str}\\n\\nChoose an operation, or ESC for main menu:" 14 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi
case $selection in
1) wifi_enable;;
2) wifi_settings;;
3) wifi_edit_networks;;
4) hotspot_settings;;
5) rm -f "$data"
break;;
esac
rm -f "$data"
done
}
@ -2299,6 +2292,7 @@ function menu_top_level {
# shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 28 60 28 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
break
fi