form_for @task.becomes(Task) do |f|

.form-group
  = f.label :name
  = f.text_field :name, class: 'form-control'

.form-group
  = f.label :type, 'Action'
  = f.select(:type, options_for_select(Task.selectable_actions, @task.type), {}, {class: 'form-control'})

.form-group
  = f.label :trigger
  = f.text_field :trigger, class: 'form-control'

.form-group
  = f.label :database, 'Database'
  = f.number_field :database, class: 'form-control'

.form-group
  = f.label :every, 'Every (seconds)'
  = f.number_field :every, class: 'form-control'

.form_group
  .checkbox
    = f.label :status, {style: 'font-weight:bold'} do
      = f.check_box :status, {}, Task::ACTIVE, Task::INACTIVE
      = 'Active'

.form-group
  %button.btn.btn-default{type: 'submit', style: 'margin-right: 10px'}
    Save
  %a{href: tasks_path}
    Cancel