etherpad configuration menu style

This commit is contained in:
Bob Mottram 2018-04-04 13:08:03 +01:00
parent 5c410c4b34
commit 7f027206e6
1 changed files with 11 additions and 18 deletions

View File

@ -269,29 +269,22 @@ function etherpad_set_welcome_message {
} }
function configure_interactive_etherpad { function configure_interactive_etherpad {
W=(1 $"Set Title"
2 $"Set a welcome message")
while true while true
do do
data=$(mktemp 2>/dev/null) # shellcheck disable=SC2068
dialog --backtitle $"Freedombone Control Panel" \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Etherpad" --menu $"Choose an operation, or ESC to exit:" 10 60 2 "${W[@]}" 3>&2 2>&1 1>&3)
--title $"Etherpad Settings" \
--radiolist $"Choose an operation:" 12 70 3 \ if [ ! "$selection" ]; then
1 $"Set Title" off \ break
2 $"Set a welcome message" off \ fi
3 $"Exit" on 2> "$data"
sel=$? case $selection in
case $sel in
1) rm -f "$data"
return;;
255) rm -f "$data"
return;;
esac
case $(cat "$data") in
1) etherpad_set_title;; 1) etherpad_set_title;;
2) etherpad_set_welcome_message;; 2) etherpad_set_welcome_message;;
3) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }