From 5c0745c0349f0709d0fc36fd8a97dcab86bce28a Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Tue, 23 May 2023 06:26:48 +0900 Subject: Add validations.required check to dropdown field (#24849) If dropdown is marked as required, we should not provide the `remove` button. This will cause user may post empty value which seems like a bug. Definition: ![image](https://github.com/go-gitea/gitea/assets/18380374/cf48b478-244e-44e0-9a0e-7a0f02bc471a) Post request form: ![image](https://github.com/go-gitea/gitea/assets/18380374/31d6f823-835f-422a-879c-3b1e18950ac8) Result: ![image](https://github.com/go-gitea/gitea/assets/18380374/a9944fe9-24d0-4776-9eec-d31b70144eb4) --- templates/repo/issue/fields/dropdown.tmpl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'templates/repo/issue') diff --git a/templates/repo/issue/fields/dropdown.tmpl b/templates/repo/issue/fields/dropdown.tmpl index 28e5d27e33..23aa373cd2 100644 --- a/templates/repo/issue/fields/dropdown.tmpl +++ b/templates/repo/issue/fields/dropdown.tmpl @@ -4,7 +4,9 @@