Template.sourceEdit.created = function() {
  Session.set('sourceEditErrors', {});
}

Template.sourceEdit.helpers({
  errorMessage: function(field) {
    return Session.get('sourceEditErrors')[field];
  },
  errorClass: function (field) {
    return !!Session.get('sourceEditErrors')[field] ? 'has-error' : '';
  }
});

Template.sourceEdit.events({
  'submit form': function(e, template) {
    e.preventDefault();

    var currentSourceId = this._id;
    var projectId = this.projectId;

    var $body = $(e.target).find('[name=body]');
    var sourceProperties = {
      body: $body.val(),
    };

    var errors = {};
    if (! sourceProperties.body) {
      errors.body = "Please write some content";
      return Session.set('sourceEditErrors', errors);
    }

    Sources.update(currentSourceId, {$set: sourceProperties}, function(error) {
      if (error) {
        throwError(error.reason);
      } else {
        Router.go('projectPage', {_id: projectId});
      }
    });
  }
});

@@ -973,16 +973,310 @@
     %7D);%0A
+  %7D,%0A%0A  'click .delete': function(e) %7B%0A    e.preventDefault();%0A%0A    if (confirm(%22Delete this source?%22)) %7B%0A      var projectId = this.projectId;%0A      Projects.update(projectId, %7B$inc: %7BsourcesCount: -1%7D%7D);%0A      Sources.remove(this._id);%0A      Router.go('projectPage', %7B_id: projectId%7D);%0A    %7D%0A
   %7D%0A%7D);%0A

Allow for deleting sources.