- @pagetitle = 'Edit Canned Response'

.card
  .card-body
    %h4 Edit canned response
    = form_for(@canned_response) do |f|
      .mb-3
        = f.label :title, 'Title:'
        = f.text_field :title, class: 'form-control'
      .mb-3
        = f.label :content, 'Content:'
        = f.text_area :content, class: 'form-control', rows: 10
      - if policy(Decision.new).create?
        .mb-3
          = f.label :decision_type, "Choose 'cleared' or 'favored' if this is a decision's reason"
          - types = CannedResponse.decision_types.keys.to_h { |t| [t.humanize, t] }
          = f.select(:decision_type, types , { include_blank: 'none' }, class: 'form-select')
      = f.submit 'Save', class: 'btn btn-primary'
