<commit_before>{% extends "pages/page.html" %}

{% load mezzanine_tags pages_tags hydroshare_tags %}

{% block extra_head %}
    <link href="{{ STATIC_URL }}css/site_base_irods.css" rel="stylesheet"/>
    <link href="{{ STATIC_URL }}css/hs-file-icons.css" rel="stylesheet"/>
{% endblock %}

{% block meta_title %}Create document{% endblock %}

{% block main %}
    <div class="container">
        <div id="resource-content" class="row">
            <div class="col-xs-12">
                {% block error %}
                    {% if validation_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Validation Error: {{ validation_error }}</strong>
                        </div>
                    {% endif %}
                    {% if file_size_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Uploaded File Size Error: {{ file_size_error }}</strong>
                        </div>
                    {% endif %}
                    {% if resource_creation_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Failed to Create Document: {{ resource_creation_error }}</strong>
                        </div>
                    {% endif %}
                {% endblock %}

                <div class="alert alert-info">
                    <p>When you click Create Document, the files will be uploaded to the MyHPOM server. Click
                        <strong><a href="https://help.hydroshare.org/sharing-and-privacy/formally-publishing-resources/"
                           target="_blank">here</a></strong>
                        to learn more about next steps to share and formally publish your data.--> </p>
                </div>
            </div>


            <div class="col-xs-12">
                <label for="dropdown-resource-type" class="col-form-label">Select a resource type</label>
                <div id="dropdown-resource-type" class="dropdown">
                    <div id="select-resource-type" class="resource-type selected-type disabled" data-toggle="dropdown"
                         aria-haspopup="true" aria-expanded="true">
                        <img src="{{ STATIC_URL }}img/resource-icons/generic48x48.png"
                             alt="Generic Resource Icon" class="resource-type-icon"/>
                        <div class="resource-type-name">&nbsp;Document</div>
                    </div>

                    <ul class="dropdown-menu shadow-md" aria-labelledby="select-resource-type">
                        {# GENERAL #}
                        <li class="dropdown-header">General</li>
                    </ul>
                </div>
                <div id="ajax-upload-alert-container"></div>
            </div>

            <br>

            <label for="title" class="col-xs-12 col-form-label">Input a title</label>

            <div class="col-xs-12">
                <input id="txtTitle" placeholder="Untitled Document" class="form-control" type="text">
                <br>
            </div>

            <div id="upload-content" class="col-xs-12">
                <div class="row">
                    <label for="hsDropzone" class="col-xs-12 col-form-label">Add your files</label>

                    <div class="col-xs-12 col-sm-8 col-md-9">
                        <form id="hsDropzone" class="dropzone" role="form" method="POST"
                              enctype="multipart/form-data"
                              action="/hsapi/_internal/create-resource/do/">
                            {% csrf_token %}


                            <div class="hs-dropzone-header">
                                <i class="fa fa-info-circle" aria-hidden="true"></i>
                                <span class="hs-dropzone-header-help">Drop files below or click to upload.</span>
                                <span id="btn-remove-all-files" class="btn btn-default pull-right">
                                    <i class="fa fa-trash-o btn-remove" aria-hidden="true"></i>
                                    <span>&nbsp;&nbsp;Remove All Files</span>
                                </span>
                            </div><commit_msg>[#80] Removes select document from upload content page.<commit_after>{% extends "pages/page.html" %}

{% load mezzanine_tags pages_tags hydroshare_tags %}

{% block extra_head %}
    <link href="{{ STATIC_URL }}css/site_base_irods.css" rel="stylesheet"/>
    <link href="{{ STATIC_URL }}css/hs-file-icons.css" rel="stylesheet"/>
{% endblock %}

{% block meta_title %}Create document{% endblock %}

{% block main %}
    <div class="container">
        <div id="resource-content" class="row">
            <div class="col-xs-12">
                {% block error %}
                    {% if validation_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Validation Error: {{ validation_error }}</strong>
                        </div>
                    {% endif %}
                    {% if file_size_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Uploaded File Size Error: {{ file_size_error }}</strong>
                        </div>
                    {% endif %}
                    {% if resource_creation_error %}
                        <div class="alert alert-danger alert-dismissible" role="alert">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">&times;</span></button>
                            <strong>Failed to Create Document: {{ resource_creation_error }}</strong>
                        </div>
                    {% endif %}
                {% endblock %}

                <div class="alert alert-info">
                    <p>When you click Create Document, the files will be uploaded to the MyHPOM server. Click
                        <strong><a href="https://help.hydroshare.org/sharing-and-privacy/formally-publishing-resources/"
                           target="_blank">here</a></strong>
                        to learn more about next steps to share and formally publish your data.--> </p>
                </div>
            </div>

            <label for="title" class="col-xs-12 col-form-label">Input a title</label>

            <div class="col-xs-12">
                <input id="txtTitle" placeholder="Untitled Document" class="form-control" type="text">
                <br>
            </div>

            <div id="upload-content" class="col-xs-12">
                <div class="row">
                    <label for="hsDropzone" class="col-xs-12 col-form-label">Add your files</label>

                    <div class="col-xs-12 col-sm-8 col-md-9">
                        <form id="hsDropzone" class="dropzone" role="form" method="POST"
                              enctype="multipart/form-data"
                              action="/hsapi/_internal/create-resource/do/">
                            {% csrf_token %}


                            <div class="hs-dropzone-header">
                                <i class="fa fa-info-circle" aria-hidden="true"></i>
                                <span class="hs-dropzone-header-help">Drop files below or click to upload.</span>
                                <span id="btn-remove-all-files" class="btn btn-default pull-right">
                                    <i class="fa fa-trash-o btn-remove" aria-hidden="true"></i>
                                    <span>&nbsp;&nbsp;Remove All Files</span>
                                </span>
                            </div>
{'fraction_non_alphanumeric': 0.1346545866364666, 'fraction_numerical': 0.0040770101925254815, 'mean_word_length': 1.4227709190672153, 'pattern_counts': {'":': 0, '<': 145, '<?xml version=': 0, '>': 147, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6261497', 'n_tokens_mistral': 2331, 'n_tokens_neox': 2112, 'n_words': 455}