Template.activityEdit.created = function() {
  Session.set('activityEditErrors', {});
};

Template.activityEdit.events({
  'submit form': function(e) {
    e.preventDefault();

    var currentActivityId = this._id;

    var activityProperties = {
      title: $(e.target).find('[name=title]').val(),
      date: $(e.target).find('[name=date]').val(),
      time: $(e.target).find('[name=time]').val(),
      maxAttendees: parseInt($(e.target).find('[name=max-attendees]').val()),
      description: $(e.target).find('[name=description]').val()
    };

    Activities.update(currentActivityId, {$set: activityProperties}, function(error) {
      if (error) {
        throwError(error.reason);
      } else {
        Router.go('activitiesList');
      }
    });
  },

  'click .delete': function(e) {
    e.preventDefault();

    if (confirm("Delete this activity?")) {
      var currentActivityId = this._id;
      Activities.remove(currentActivityId);
      Router.go('activitiesList');
    }
  }
});
@@ -760,16 +760,19 @@
 %0A  %7D,%0A%0A 
+ //
  'click 
@@ -788,32 +788,35 @@
  function(e) %7B%0A 
+ //
    e.preventDefa
@@ -824,16 +824,19 @@
 lt();%0A%0A 
+ //
    if (c
@@ -867,24 +867,27 @@
 vity?%22)) %7B%0A 
+ //
      var cur
@@ -914,16 +914,19 @@
 s._id;%0A 
+ //
      Act
@@ -957,24 +957,27 @@
 tivityId);%0A 
+ //
      Router.
@@ -999,20 +999,26 @@
 ist');%0A 
+ //
    %7D%0A 
+ //
  %7D%0A%7D);

comment out unused but future function'