From 45d4b6f25663cb46e59e99d405bc43afaaf2af8b Mon Sep 17 00:00:00 2001 From: zhangyu Date: Thu, 28 Nov 2024 15:27:05 +0800 Subject: [PATCH] * [task#133321 doing 0.1h 1.2h] modify readonly value of thinktableinput. --- lib/zin/wg/thinktableinput/css/v1.css | 2 +- lib/zin/wg/thinktableinput/v1.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/zin/wg/thinktableinput/css/v1.css b/lib/zin/wg/thinktableinput/css/v1.css index 214e5418a4..d6e92076dd 100644 --- a/lib/zin/wg/thinktableinput/css/v1.css +++ b/lib/zin/wg/thinktableinput/css/v1.css @@ -1,3 +1,3 @@ .form-horz .form-group {align-items: center;} .result-width {width: calc(100% - 148px);} -.form-control[disabled] {background-color: rgba(var(--color-gray-100-rgb),var(--tw-bg-opacity)); --tw-bg-opacity: .4; color:rgba(var(--color-gray-700-rgb),var(--tw-bg-opacity))} \ No newline at end of file +.form-control[readonly] {cursor: not-allowed; background-color: rgba(var(--color-gray-100-rgb),var(--tw-bg-opacity)); --tw-bg-opacity: .4; color:rgba(var(--color-gray-700-rgb),var(--tw-bg-opacity))} \ No newline at end of file diff --git a/lib/zin/wg/thinktableinput/v1.php b/lib/zin/wg/thinktableinput/v1.php index b5a08b8d77..8546e6d07f 100644 --- a/lib/zin/wg/thinktableinput/v1.php +++ b/lib/zin/wg/thinktableinput/v1.php @@ -86,7 +86,7 @@ class thinkTableInput extends thinkQuestion 'min' => 1, 'max' => 100, 'value' => $value, - 'disabled' => ($value && !$canConfigureRatio), + 'readonly' => ($value && !$canConfigureRatio), 'placeholder' => $lang->thinkrun->pleaseInput )), on::input('changePercentInput') @@ -109,7 +109,6 @@ class thinkTableInput extends thinkQuestion ) : null, ) ), - (!empty($inputType) && $value && !$canConfigureRatio) ? formHidden('result[' . $index . ']', $value) : null ); $index ++; }