<commit_before>{% extends sitebase.html %}
{% block head %}
{% set study_title = study_info['study_title'] %}
{% set study_title_msg = study_title.replace('"', '\\"') %}
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis.min.css" type="text/css">
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis-network.min.css" type="text/css">
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/vis.min.js"></script>
<script type="text/javascript">
  var network = null;
  // Track what prep template is currently being shown.
  var curr_prep = -1;
  function togglegraphs(id) {
    if($("#study-prep-graph-row").css('display') == 'none' ) {
      $("#study-prep-graph-row").show();
      $("#graph-toggle-link").text("Hide files");
    } else {
      $("#study-prep-graph-row").hide();
       $("#graph-toggle-link").text("Show files");
    }
  }

  function fill_artifact(aid) {
  $.get("{% raw qiita_config.portal_dir %}/admin/artifact/", {artifact_id: +aid })
      .done(function ( data ) {
        $("#study-admin").html(data);
      });
  }

  function validate_delete_study_text() {
    if ($("#study-alias").val() == "{% raw study_title_msg %}") {
      $('#delete-study-button').prop('disabled', false);
    } else {
      $('#delete-study-button').prop('disabled', true);
    }
  }

  function delete_study() {
    if($("#study-alias").val() != "{% raw study_title_msg %}") {
      alert("The entered study alias doesn't match the study");
      return false;
    }
    else if(confirm("Are you sure you want to delete {% raw study_title_msg %}?")) {
      $.post('{% raw qiita_config.portal_dir %}/study/delete/', { study_id: {{study_info['study_id']}} })
        .done(function ( data ) {
          location.reload();
        });<commit_msg>addressing @josenavas comment + rm other methods<commit_after>{% extends sitebase.html %}
{% block head %}
{% set study_title = study_info['study_title'] %}
{% set study_title_msg = study_title.replace('"', '\\"') %}
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis.min.css" type="text/css">
<link rel="stylesheet" src="{% raw qiita_config.portal_dir %}/static/vendor/css/vis-network.min.css" type="text/css">
<script type="text/javascript" src="{% raw qiita_config.portal_dir %}/static/vendor/js/vis.min.js"></script>
<script type="text/javascript">
  function validate_delete_study_text() {
    if ($("#study-alias").val() == "{% raw study_title_msg %}") {
      $('#delete-study-button').prop('disabled', false);
    } else {
      $('#delete-study-button').prop('disabled', true);
    }
  }

  function delete_study() {
    if($("#study-alias").val() != "{% raw study_title_msg %}") {
      alert("The entered study alias doesn't match the study");
      return false;
    }
    else if(confirm("Are you sure you want to delete {% raw study_title_msg %}?")) {
      $.post('{% raw qiita_config.portal_dir %}/study/delete/', { study_id: {{study_info['study_id']}} })
        .done(function ( data ) {
          location.reload();
        });
{'fraction_non_alphanumeric': 0.20557156580211336, 'fraction_numerical': 0.0003202049311559398, 'mean_word_length': 3.7477203647416415, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4993477', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1023, 'n_words': 197}