<commit_before>{% extends 'base.html' %}
{% load staticfiles %}
{% load custom_tags %}
{% block title %}Program Upload | ISB-CGC{% endblock %}}
{% block extra_css_libs %}{% endblock %}
{% block header %}{% endblock %}

{% block link_page_name %}program_upload{% endblock %}
{% block page_name %}program_upload{% endblock %}

{% block page_header %}
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="{% url 'dashboard' %}">Your Dashboard</a></li>
            <li><a href="{% url 'programs' %}">Saved Programs</a></li>
        </ol>
        <h1 class="page-header">Data Upload</h1>
        <div id="unallowed-chars-alert" class="alert alert-warning alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            Your <span class="unallowed-fields"></span> contain invalid characters (<span class="unallowed-chars"></span>). Please choose different <span class="unallowed-fields"></span>.
        </div>
    </div>
{% endblock %}
{% block content %}
<div class="container">
    <div class="error-message-container"></div>
    <!--File upload section-->
    <section class="panel panel-default" id="first-section">
        <ul class="nav nav-tabs" role="tablist">
            <li {% if not existing_proj %}class="active"{% endif %} role="presentation">
                <a aria-controls="program-upload" role="tab" data-toggle="tab" data-target="#program-info" data-value="new">A New Program</a>
            </li>
            <li {% if existing_proj %}class="active"{% endif %} role="presentation">
                <a class="{% if user.program_set.count == 0 %}disabled{% endif %}" aria-controls="program-upload" role="tab" data-value="existing" {% if user.program_set.count > 0 %}data-toggle="tab"{% endif %} data-target="#project-info">A New Project for an Existing Program</a>
            </li>
        </ul>
        <div class="panel-heading"></div>
        <form action="{% url 'program_file_upload' %}" id="base-data-form">
            {% csrf_token %}
            <input type="hidden" id="program-tab" value="{% if existing_proj %}existing{% else %}new{% endif %}">
            <div class="panel-body">
                <section id="program-info" class="collapse {% if not existing_proj %}in{% endif %}">
                    <div class="form-group">
                        <label for="program-name">Program Name</label>
                        <input class="form-control" type="text" name="program-name" id="program-name">
                    </div>
                    <div class="form-group">
                        <label for="program-description">Program Description (Optional)</label>
                        <textarea class="form-control" name="program-description" id="program-description" cols="30" rows="5" maxlength="2048"></textarea>
                    </div>
                </section>
                <section>
                    <div class="form-group collapse {% if existing_proj %}in{% endif %}" id="project-info">
                        <label for="program-name">Program Name</label>
                        <select class="form-control" required id="program-selection">
                            <option value="" disabled hidden {% if not existing_proj and not program_id %} selected {% endif %}>-- Select Program --</option>
                            {% for program in programs %}
                                {% if not program.is_public %}
                                    <option value="{{ program.id }}" {% if existing_proj and program_id and program_id|slugify == program.id|slugify %} selected {% endif %}>{{ program.name }}</option>
                                {% endif %}
                            {% endfor %}
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="project-name">Project Name</label>
                        <input class="form-control" type="text" name="project-name" id="project-name" required>
                    </div>
                    <div class="form-group">
                        <label for="project-description">Project Description (Optional)</label>
                        <textarea class="form-control" name="project-description" id="project-description" cols="30" rows="5" maxlength="2048"></textarea>
                    </div>
                </section>
                <section id="data-upload-group">
                    <div class="form-group">
                        <label>Data Upload</label>
                        <p>Please refer to the <a href="{% url 'system_data_dict' %}" target="_blank">system data dictionary <i class="fa fa-share-square-o"></i></a> for proper naming and data type conventions.</p>
                        <div class="checkbox">
                            <label>
                                <input class="data-radio" type="radio" name="data" checked value="high"> High level data files
                            </label>
                            <div class="checkbox sub-checkbox">
                                <label>
                                    <input type="checkbox" name="extend" id="high-level-extend"> Extends an existing program's project data
                                </label>
                                <select class="form-control inline-block input-sm" id="high-level-extend-project" disabled>
                                    <option value="" disabled selected hidden>-- Select a Program/Project --</option>
{#                                    <option>All TCGA Data</option>#}
                                    {% for program in programs %}
                                    <optgroup label="{{ program.name }}">
                                    {% for project in program.project_set.all %}
                                        {% if project.active %}
                                        <option value="{{ project.id }}">{{ project.name }}</option><commit_msg>Sort projects in dropdown menu<commit_after>{% extends 'base.html' %}
{% load staticfiles %}
{% load custom_tags %}
{% block title %}Program Upload | ISB-CGC{% endblock %}}
{% block extra_css_libs %}{% endblock %}
{% block header %}{% endblock %}

{% block link_page_name %}program_upload{% endblock %}
{% block page_name %}program_upload{% endblock %}

{% block page_header %}
    <div class="container">
        <ol class="breadcrumb">
            <li><a href="{% url 'dashboard' %}">Your Dashboard</a></li>
            <li><a href="{% url 'programs' %}">Saved Programs</a></li>
        </ol>
        <h1 class="page-header">Data Upload</h1>
        <div id="unallowed-chars-alert" class="alert alert-warning alert-dismissable" style="display: none;">
            <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
            Your <span class="unallowed-fields"></span> contain invalid characters (<span class="unallowed-chars"></span>). Please choose different <span class="unallowed-fields"></span>.
        </div>
    </div>
{% endblock %}
{% block content %}
<div class="container">
    <div class="error-message-container"></div>
    <!--File upload section-->
    <section class="panel panel-default" id="first-section">
        <ul class="nav nav-tabs" role="tablist">
            <li {% if not existing_proj %}class="active"{% endif %} role="presentation">
                <a aria-controls="program-upload" role="tab" data-toggle="tab" data-target="#program-info" data-value="new">A New Program</a>
            </li>
            <li {% if existing_proj %}class="active"{% endif %} role="presentation">
                <a class="{% if user.program_set.count == 0 %}disabled{% endif %}" aria-controls="program-upload" role="tab" data-value="existing" {% if user.program_set.count > 0 %}data-toggle="tab"{% endif %} data-target="#project-info">A New Project for an Existing Program</a>
            </li>
        </ul>
        <div class="panel-heading"></div>
        <form action="{% url 'program_file_upload' %}" id="base-data-form">
            {% csrf_token %}
            <input type="hidden" id="program-tab" value="{% if existing_proj %}existing{% else %}new{% endif %}">
            <div class="panel-body">
                <section id="program-info" class="collapse {% if not existing_proj %}in{% endif %}">
                    <div class="form-group">
                        <label for="program-name">Program Name</label>
                        <input class="form-control" type="text" name="program-name" id="program-name">
                    </div>
                    <div class="form-group">
                        <label for="program-description">Program Description (Optional)</label>
                        <textarea class="form-control" name="program-description" id="program-description" cols="30" rows="5" maxlength="2048"></textarea>
                    </div>
                </section>
                <section>
                    <div class="form-group collapse {% if existing_proj %}in{% endif %}" id="project-info">
                        <label for="program-name">Program Name</label>
                        <select class="form-control" required id="program-selection">
                            <option value="" disabled hidden {% if not existing_proj and not program_id %} selected {% endif %}>-- Select Program --</option>
                            {% for program in programs %}
                                {% if not program.is_public %}
                                    <option value="{{ program.id }}" {% if existing_proj and program_id and program_id|slugify == program.id|slugify %} selected {% endif %}>{{ program.name }}</option>
                                {% endif %}
                            {% endfor %}
                        </select>
                    </div>
                    <div class="form-group">
                        <label for="project-name">Project Name</label>
                        <input class="form-control" type="text" name="project-name" id="project-name" required>
                    </div>
                    <div class="form-group">
                        <label for="project-description">Project Description (Optional)</label>
                        <textarea class="form-control" name="project-description" id="project-description" cols="30" rows="5" maxlength="2048"></textarea>
                    </div>
                </section>
                <section id="data-upload-group">
                    <div class="form-group">
                        <label>Data Upload</label>
                        <p>Please refer to the <a href="{% url 'system_data_dict' %}" target="_blank">system data dictionary <i class="fa fa-share-square-o"></i></a> for proper naming and data type conventions.</p>
                        <div class="checkbox">
                            <label>
                                <input class="data-radio" type="radio" name="data" checked value="high"> High level data files
                            </label>
                            <div class="checkbox sub-checkbox">
                                <label>
                                    <input type="checkbox" name="extend" id="high-level-extend"> Extends an existing program's project data
                                </label>
                                <select class="form-control inline-block input-sm" id="high-level-extend-project" disabled>
                                    <option value="" disabled selected hidden>-- Select a Program/Project --</option>
{#                                    <option>All TCGA Data</option>#}
                                    {% for program in programs %}
                                    <optgroup label="{{ program.name }}">
                                    {% for project in program.project_set.all|dictsort:"name" %}
                                        {% if project.active %}
                                        <option value="{{ project.id }}">{{ project.name }}</option>
{'fraction_non_alphanumeric': 0.1509433962264151, 'fraction_numerical': 0.00294045577064445, 'mean_word_length': 1.8089011241110347, 'pattern_counts': {'":': 0, '<': 223, '<?xml version=': 0, '>': 225, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '235826', 'n_tokens_mistral': 3275, 'n_tokens_neox': 2945, 'n_words': 743}