diff options
author | Aleksander Machniak <alec@alec.pl> | 2022-03-12 18:52:27 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2022-03-12 18:52:27 +0300 |
commit | 3307eb6b28ef66c215952517fdf7a8609084fc3b (patch) | |
tree | 50d382e5025486e07fd454eddb04f9d6567f84e1 | |
parent | a2560eb7ffb0135f3c5a081d5235216ea930d4e4 (diff) |
Don't overwrite initial html_checkbox's 'checked' attribute (#8471)
-rw-r--r-- | program/lib/Roundcube/html.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/program/lib/Roundcube/html.php b/program/lib/Roundcube/html.php index cec991135..4992633ed 100644 --- a/program/lib/Roundcube/html.php +++ b/program/lib/Roundcube/html.php @@ -542,8 +542,10 @@ class html_checkbox extends html_inputfield $this->attrib = array_merge($this->attrib, $attrib); } - // set value attribute - $this->attrib['checked'] = isset($this->attrib['value']) && ((string)$value == (string)$this->attrib['value']); + // set 'checked' attribute + if (!isset($this->attrib['checked'])) { + $this->attrib['checked'] = isset($this->attrib['value']) && ((string)$value == (string)$this->attrib['value']); + } return parent::show(); } |