From 7e94831644bd478be7c817a26a260b690d5e6324 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Thu, 4 Jul 2024 16:24:20 +0800 Subject: [PATCH] + [task#121513] Show the confirm message before save. --- module/instance/lang/de.php | 4 +++- module/instance/lang/en.php | 4 +++- module/instance/lang/fr.php | 4 +++- module/instance/lang/zh-cn.php | 4 +++- module/instance/ui/setting.html.php | 3 +++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/module/instance/lang/de.php b/module/instance/lang/de.php index e7cf2853ae..32f9f9bb67 100644 --- a/module/instance/lang/de.php +++ b/module/instance/lang/de.php @@ -358,4 +358,6 @@ $lang->instance->errors->invalidDiskSize = 'The disk space size must be an $lang->instance->tips = new stdclass; $lang->instance->tips->resizeDisk = 'Fill in an integer from %s to %y with unit GB'; -$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; \ No newline at end of file +$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; +$lang->instance->tips->fSettingsAttention = 'Changing the Settings of CPU, memory, disk, etc. will restart the application, and the disk space size can only be increased, not reduced, please be careful!'; +$lang->instance->tips->pSettingsAttention = 'Changing the CPU, memory, and other Settings will restart the application, please be careful!'; \ No newline at end of file diff --git a/module/instance/lang/en.php b/module/instance/lang/en.php index e7cf2853ae..32f9f9bb67 100644 --- a/module/instance/lang/en.php +++ b/module/instance/lang/en.php @@ -358,4 +358,6 @@ $lang->instance->errors->invalidDiskSize = 'The disk space size must be an $lang->instance->tips = new stdclass; $lang->instance->tips->resizeDisk = 'Fill in an integer from %s to %y with unit GB'; -$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; \ No newline at end of file +$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; +$lang->instance->tips->fSettingsAttention = 'Changing the Settings of CPU, memory, disk, etc. will restart the application, and the disk space size can only be increased, not reduced, please be careful!'; +$lang->instance->tips->pSettingsAttention = 'Changing the CPU, memory, and other Settings will restart the application, please be careful!'; \ No newline at end of file diff --git a/module/instance/lang/fr.php b/module/instance/lang/fr.php index e7cf2853ae..32f9f9bb67 100644 --- a/module/instance/lang/fr.php +++ b/module/instance/lang/fr.php @@ -358,4 +358,6 @@ $lang->instance->errors->invalidDiskSize = 'The disk space size must be an $lang->instance->tips = new stdclass; $lang->instance->tips->resizeDisk = 'Fill in an integer from %s to %y with unit GB'; -$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; \ No newline at end of file +$lang->instance->tips->resizeDiskDisabled = 'The disk space not adjustable'; +$lang->instance->tips->fSettingsAttention = 'Changing the Settings of CPU, memory, disk, etc. will restart the application, and the disk space size can only be increased, not reduced, please be careful!'; +$lang->instance->tips->pSettingsAttention = 'Changing the CPU, memory, and other Settings will restart the application, please be careful!'; \ No newline at end of file diff --git a/module/instance/lang/zh-cn.php b/module/instance/lang/zh-cn.php index fc2e4e9158..6eeff1eb58 100644 --- a/module/instance/lang/zh-cn.php +++ b/module/instance/lang/zh-cn.php @@ -358,4 +358,6 @@ $lang->instance->errors->invalidDiskSize = '磁盘空间大小必须是介 $lang->instance->tips = new stdclass; $lang->instance->tips->resizeDisk = '填写%s~%s的整数,单位GB'; -$lang->instance->tips->resizeDiskDisabled = '该应用的磁盘空间不可调整'; \ No newline at end of file +$lang->instance->tips->resizeDiskDisabled = '该应用的磁盘空间不可调整'; +$lang->instance->tips->fSettingsAttention = '修改CPU、内存、磁盘等设置会重启应用,且磁盘空间大小只能增加不可减少,请谨慎操作!'; +$lang->instance->tips->pSettingsAttention = '修改CPU、内存等设置会重启应用,请谨慎操作!'; \ No newline at end of file diff --git a/module/instance/ui/setting.html.php b/module/instance/ui/setting.html.php index 5bccbde593..07f8304376 100644 --- a/module/instance/ui/setting.html.php +++ b/module/instance/ui/setting.html.php @@ -12,8 +12,11 @@ declare(strict_types=1); namespace zin; +if(!$diskSettings->resizable) $lang->instance->tips->fSettingsAttention = $lang->instance->tips->pSettingsAttention; + formPanel ( + set::ajax(array('beforeSubmit' => jsRaw("() => zui.Modal.confirm({message: '{$lang->instance->tips->fSettingsAttention}', icon: 'icon-exclamation-sign', iconClass: 'warning-pale rounded-full icon-2x'})"))), set::id('instanceSettingForm'), set::title($lang->instance->setting), set::submitBtnText($lang->save),