arc-functions: rewrite OK to save for editboxes

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-05-01 14:09:05 +02:00
parent 0a6fe79d66
commit e79c40ddb2

View File

@@ -3,7 +3,7 @@
function editUserConfig() {
while true; do
dialog --backtitle "$(backtitle)" --title "Edit with caution" \
--editbox "${USER_CONFIG_FILE}" 0 0 2>"${TMP_PATH}/userconfig"
--ok-label "Save" --editbox "${USER_CONFIG_FILE}" 0 0 2>"${TMP_PATH}/userconfig"
[ $? -ne 0 ] && return 1
mv -f "${TMP_PATH}/userconfig" "${USER_CONFIG_FILE}"
ERRORS=$(yq eval "${USER_CONFIG_FILE}" 2>&1)
@@ -1978,8 +1978,8 @@ function resetLoader() {
# let user edit the grub.cfg
function editGrubCfg() {
while true; do
dialog --backtitle "$(backtitle)" --colors --title "Edit grub.cfg with caution" \
--editbox "${GRUB_PATH}/grub.cfg" 0 0 2>"${TMP_PATH}/usergrub.cfg"
dialog --backtitle "$(backtitle)" --title "Edit with caution" \
--ok-label "Save" --editbox "${GRUB_PATH}/grub.cfg" 0 0 2>"${TMP_PATH}/usergrub.cfg"
[ $? -ne 0 ] && return
mv -f "${TMP_PATH}/usergrub.cfg" "${GRUB_PATH}/grub.cfg"
break