<commit_before>AutoForm.hooks({
  insertHospitalForm: {
    onSuccess: function(operation, result, template) {
       Router.go('dashboard');
      return sAlert.success('Profile updated');

    },
    onError: function(operation, error, template) {
      return sAlert.error(error);
    }
  },
  updatePicture: {
    onSuccess: function(operation, result, template) {
      return sAlert.success('Picture Updated');
    },
    onError: function(operation, error, template) {
      return sAlert.error(error);
    }
  }
});

Template.hospitalSignUp.rendered = function () {
  console.log('down to here');
  Meteor.setTimeout(function(){
    $('#at-field-hospital').val('true');
  }, 1000);
};


Template.updateHospital.helpers({
  aHospital: function() {
    var id = Meteor.userId();
    return Hospitals.findOne({ "owner": id });
  },
  categories: function() {
    return Categories.find().fetch();
  },
  hasCategory: function() {
    var post = Posts.findOne(Session.get('selectedPostId'));
    return _.contains(post.categories, this.name) ? 'checked' : '';
  }
});

Template.hospitalinfo.helpers({
  aHospital: function() {
    var id = Meteor.userId();
    return Hospitals.findOne({ "owner": id });
  }
});

// Template.loginForm.events({
//   "submit #login-form": function(event, template) {
//     event.preventDefault();
//     Meteor.loginWithPassword(
//       template.find("#login-username").value,
//       template.find("#login-password").value,
//       function(error) {
//         if (error) {
//           // Display the login error to the user however you want
//         }
//       }
//       );
//   }
// });

// Template.logoutForm.events({
//   "submit #logout-form": function(event, template) {
//     event.preventDefault();
//     Meteor.logout(function(error) {
//       if (error) {
//         // Display the logout error to the user however you want
//       }
//     });
//   }
// });

<commit_msg>Added an alert to updated<commit_after>AutoForm.hooks({
  insertHospitalForm: {
    onSuccess: function(operation, result, template) {
       Router.go('dashboard');
      return sAlert.success('Profile Created');

    },
    onError: function(operation, error, template) {
      return sAlert.error(error);
    }
  },
  updateHospital: {
    onSuccess: function(operation, result, template) {
       Router.go('hospitalinfo');
      return sAlert.success('Profile updated');

    },
    onError: function(operation, error, template) {
      return sAlert.error(error);
    }
  },
  updatePicture: {
    onSuccess: function(operation, result, template) {
      return sAlert.success('Picture Updated');
    },
    onError: function(operation, error, template) {
      return sAlert.error(error);
    }
  }
});

Template.hospitalSignUp.rendered = function () {
  console.log('down to here');
  Meteor.setTimeout(function(){
    $('#at-field-hospital').val('true');
  }, 1000);
};


Template.updateHospital.helpers({
  aHospital: function() {
    var id = Meteor.userId();
    return Hospitals.findOne({ "owner": id });
  },
  categories: function() {
    return Categories.find().fetch();
  },
  hasCategory: function() {
    var post = Posts.findOne(Session.get('selectedPostId'));
    return _.contains(post.categories, this.name) ? 'checked' : '';
  }
});

Template.hospitalinfo.helpers({
  aHospital: function() {
    var id = Meteor.userId();
    return Hospitals.findOne({ "owner": id });
  }
});

// Template.loginForm.events({
//   "submit #login-form": function(event, template) {
//     event.preventDefault();
//     Meteor.loginWithPassword(
//       template.find("#login-username").value,
//       template.find("#login-password").value,
//       function(error) {
//         if (error) {
//           // Display the login error to the user however you want
//         }
//       }
//       );
//   }
// });

// Template.logoutForm.events({
//   "submit #logout-form": function(event, template) {
//     event.preventDefault();
//     Meteor.logout(function(error) {
//       if (error) {
//         // Display the logout error to the user however you want
//       }
//     });
//   }
// });


{'fraction_non_alphanumeric': 0.17222222222222222, 'fraction_numerical': 0.001932367149758454, 'mean_word_length': 2.720575022461815, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4100432', 'n_tokens_mistral': 1282, 'n_tokens_neox': 1253, 'n_words': 243}