Skip to content

Commit

Permalink
Fix disabled attribute for select and checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
mpflanzer committed Dec 21, 2024
1 parent d6e13b8 commit bb1f573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/lib/core/addon/components/form-field.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
name={{@attr.name}}
id={{@attr.name}}
onchange={{this.onChangeWithEvent}}
disabled={{and @attr.options.editDisabled (not @model.isNew)}}
data-test-input={{@attr.name}}
>
{{#if @attr.options.noDefault}}
Expand Down Expand Up @@ -335,7 +336,7 @@
{{else if (or (eq @attr.type "boolean") (eq @attr.options.editType "boolean"))}}
<div class="b-checkbox">
<input
disabled={{this.disabled}}
disabled={{and @attr.options.editDisabled (not @model.isNew)}}
type="checkbox"
id={{@attr.name}}
class="styled"
Expand Down

0 comments on commit bb1f573

Please sign in to comment.