Skip to content

Commit

Permalink
[FIX] website: restore default checked value for form radio buttons
Browse files Browse the repository at this point in the history
Same fix as for checkbox (commit [1]) and select (commit [2]).
The radio buttons were forgotten.

Check commit [1] for in-depth explanation, but this is basically because
since the qweb engine conversion to OWL (done at [3]), it would toggle
the internal `checked` value and not the `checked` attribute anymore.

[1]: odoo@b42e9cc
[2]: odoo@dd50481
[3]: odoo#130467

opw-3755078

X-original-commit: d683947
  • Loading branch information
rdeodoo committed Mar 6, 2024
1 parent 615f422 commit 49d6a9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/website/static/src/xml/website_form_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
value="Yes"
class="s_website_form_input form-check-input"
t-att-name="field.name"
t-att-checked="field.value and 'checked' or None"
t-att="{checked: field.value and 'checked' or None}"
t-att-required="field.required || field.modelRequired || None"
t-att-id="field.id"
/>
Expand Down Expand Up @@ -267,7 +267,7 @@
class="s_website_form_input form-check-input"
t-att-id="recordId"
t-att-name="field.name"
t-att-checked="record.selected and 'checked' or None"
t-att="{checked: record.selected and 'checked' or None}"
t-att-value="record.id"
t-att-required="field.required || field.modelRequired || None"
/>
Expand Down

0 comments on commit 49d6a9b

Please sign in to comment.