- content_for :head do
  = javascript_include_tag "admin/application"
= form_for [:admin, @svg_element] do |f|
  = render 'error_messages', target: @svg_element
  = f.row :name
    .form-label= f.label :name
    .form-field= f.text_field :name
  = f.row :active
    .form-label= f.label :active
    .form-field= f.check_box :active
  = f.row :input_type
    .form-label= f.label :input_type
    .form-field= f.select :input_type, %w[raw snap_code]
  = f.row :dpm
    .small-3.columns= f.label :dpm
    .small-3.columns= f.number_field :dpm, step: :any
    .small-6.columns.attribute-info= f.error_message :dpm
  = f.row :box_width
    .small-3.columns= f.label :box_width
    .small-3.columns= f.number_field :box_width, step: :any
    .small-6.columns.attribute-info
  = f.row :box_height
    .small-3.columns= f.label :box_height
    .small-3.columns= f.number_field :box_height, step: :any
    .small-6.columns.attribute-info
  = f.row :svg
    .form-label= f.label :svg
    .form-field.full= f.text_area :svg
  = f.row :snap_code
    .form-label= f.label :snap_code
  .row: .small-12.columns= f.text_area :snap_code, rows: 20, class: ['snap-code-editor'], data: {preview_target: '#svg-preview', preview: '#javascript-preview'}
  .row: .small-12.columns: pre#javascript-preview.hide
  .form-actions
    = f.submit nil, class: 'form-submit-button'
    '
    = link_to t("helpers.links.cancel"), admin_svg_elements_path, class: 'to-index-button'
- content_for :sidebar do
  .row: .small-12.columns: svg#svg-preview
