<%- if @intervention.present? %>
  var data = {
    name: "<%= @intervention.name %>",
    comment: "<%= @intervention.comment %>",
    start_date: "<%= @intervention.start_date.strftime('%B %e, %Y') %>",
    end_date: "<%= @intervention.end_date.strftime('%B %e, %Y') if @intervention.end_date.present? %>",
    educator_email: "<%= @intervention.educator.email if @intervention.educator.present? %>",
    id: "<%= @intervention.id %>"
  }
  var cell_template = $('#intervention-cell-template').html();
  var detail_template = $('#intervention-detail-template').html();
  var cell = Mustache.render(cell_template, data);
  var detail = Mustache.render(detail_template, data);
  $('#intervention-cell-list').prepend(cell);
  $('#intervention-detail-list').prepend(detail);
  $('#open-intervention-form').removeClass('solo');
  $('#new_intervention').hide();s
<%- else %>
  $('#interventions-tab form').prepend("Something went wrong!");
<%- end %>

<%- if @intervention.present? %>
  var data = {
    name: "<%= @intervention.name %>",
    comment: "<%= @intervention.comment %>",
    goal: "<%= @intervention.goal %>",
    start_date: "<%= @intervention.start_date.strftime('%B %e, %Y') %>",
    end_date: "<%= @intervention.end_date.strftime('%B %e, %Y') if @intervention.end_date.present? %>",
    educator_email: "<%= @intervention.educator.email if @intervention.educator.present? %>",
    id: "<%= @intervention.id %>"
  }
  var cell_template = $('#intervention-cell-template').html();
  var detail_template = $('#intervention-detail-template').html();
  var cell = Mustache.render(cell_template, data);
  var detail = Mustache.render(detail_template, data);
  $('#intervention-cell-list').prepend(cell);
  $('#intervention-detail-list').prepend(detail);
  $('#open-intervention-form').removeClass('solo');
  $('#new_intervention').hide();s
<%- else %>
  $('#interventions-tab form').prepend("Something went wrong!");
<%- end %>

Add intervention goal to AJAX response
Add intervention goal to AJAX response

+ Fixes https://github.com/codeforamerica/somerville-teacher-tool/issues/312#issuecomment-150339290
+ #312
