app/views/tasks/_new.html.haml
= simple_form_for(@task, html: one_submit_only, remote: true) do |f|
= link_to_close new_task_path + "?view=#{@view}"
= hidden_field_tag :view, @view
= hidden_field_tag "task[user_id]", current_user.id
= hidden_field_tag "task[asset_id]", "#{@asset.id if @asset}"
= hidden_field_tag "task[asset_type]", "#{@asset.class if @asset}"
= render "tasks/top_section", f: f
= render "fields/groups", f: f
.buttonbar
= f.submit t(:create_task), class: 'btn btn-primary'
#{t :or}
= link_to_cancel new_task_path + "?view=#{@view}"