<% if form.object.component_constraint %> <%= form.hidden_field(:component_constraint, value: form.object.component_constraint) %>
<%= form.translated :text_field, :name, aria: { label: :name } %>
<%= form.translated :editor, :description, rows: 3, aria: { label: :description } %> <%= t(".hint_html") %>
  • <%= t(".hint1_html") %>
  • <%= t(".hint2_html") %>
  • <%= t(".hint3_html") %>
<%= form.label :proposal_state_id %>
<%= form.collection_radio_buttons :proposal_state_id, available_states( form.object.component_constraint), :id, lambda { |a| translated_attribute(a.title) }, prompt: true do |builder| builder.label { builder.radio_button + builder.text } end %>
<% else %>
<%= form.select :component_constraint, availability_options_for_select, { selected: form.object.component_constraint, help_text: t(".component_constraint_help"), include_blank: true }, onchange: "this.form.submit()", disabled: form.object.component_constraint.present? %>
<%= form.hidden_field(:select_component, value: true) %> <% end %>