mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 03:56:21 +02:00
Updated texts
See https://github.com/rootzoll/raspiblitz/pull/1359#pullrequestreview-451064460
This commit is contained in:
@@ -285,7 +285,7 @@ case $CHOICE in
|
||||
;;
|
||||
REBOOT)
|
||||
clear
|
||||
confirmation "Reboot" true 9 40
|
||||
confirmation "Are you sure?" "Reboot" "Cancel" true 7 40
|
||||
confirmationReboot=$?
|
||||
if [ $confirmationReboot -eq 0 ]; then
|
||||
clear
|
||||
@@ -296,7 +296,7 @@ case $CHOICE in
|
||||
;;
|
||||
OFF)
|
||||
clear
|
||||
confirmation "PowerOff" true 9 40
|
||||
confirmation "Are you sure?" "PowerOff" "Cancel" true 7 40
|
||||
confirmationShutdown=$?
|
||||
if [ $confirmationShutdown -eq 0 ]; then
|
||||
clear
|
||||
|
@@ -3,20 +3,22 @@
|
||||
confirmation()
|
||||
{
|
||||
local text=$1
|
||||
local defaultno=$2
|
||||
local height=$3
|
||||
local width=$4
|
||||
local yesButtonText=$2
|
||||
local noButtonText=$3
|
||||
local defaultno=$4
|
||||
local height=$5
|
||||
local width=$6
|
||||
local answer=-100
|
||||
|
||||
if [ $defaultno ]; then
|
||||
whiptail --title " Confirmation " --defaultno --yes-button "Yes" --no-button "No" --yesno " $1
|
||||
whiptail --title " Confirmation " --defaultno --yes-button "$yesButtonText" --no-button "$noButtonText" --yesno " $text
|
||||
|
||||
Are you sure?
|
||||
" $height $width
|
||||
else
|
||||
whiptail --title " Confirmation " --yes-button "Yes" --no-button "No" --yesno " $1
|
||||
whiptail --title " Confirmation " --yes-button "$yesButtonText" --no-button "$noButtonText" --yesno " $text
|
||||
|
||||
Are you sure?
|
||||
" $height $width
|
||||
fi
|
||||
return $?
|
||||
answer=$?
|
||||
return $answer
|
||||
}
|
||||
|
Reference in New Issue
Block a user