{% extends "base_curator.html" %}

{% block page_content %}

    {% from "_formhelpers.html" import render_field %}
    <div class="row">
        <div class="col-md-4">
            <div class="card">
                <div class="card-body">
                    <h3 data-toggle="tooltip" title="This step allows the user to navigate the server data tree and to select the folder with the paper content." class="card-title"> Server Data Tree </h3>
                    <label for="field0"><span>Path to paper content<span class="tooltipster glyphicon glyphicon-question-sign" title="Enter the path locating the paper content. If you do not know the full path, the data tree below helps you locate the paper content, and when you click on a folder the path field is automatically updated. If your paper path is not under your home directory, type the root of the path tree and click the Search button."></span></span></label>
                    <form class="tree-form" name="tree-form">
                        <table style="display: inline-block;">
                            <tbody>
                                <tr>
                                    <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
                                    <td>{{ form.folderAbsolutePath(class_='form-control input-lg',title=form.folderAbsolutePath.description,**{'data-toggle': 'tooltip'}) }}</td>
                                    <td><input type="button" class="btn btn-theme-colored btn-lg m-0" id ="Searchbtn" value="Search" style="font-weight: bold; height: 50px;margin:10px;"/></td>
                                </tr>
                            </tbody>
                        </table>
                        <div id="projtree">
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="col-md-8">
             <div class="card">
                <div class="card-body">
                    <h3 data-toggle="tooltip" title="This step identifies whether services are running on the remote server" class="card-title"> Identify services </h3>
                    <div id = "menulist" style="width:600px;">
					<form class="services-form" name="services-form">
						<table style="display: inline-block;">
							<tbody id="services">
								<tr>
									<td><label for="field1" class="col-md-12"><span>Is there a HTTP service running on the server?<span class="tooltipster glyphicon glyphicon-question-sign" title="If a HTTP service is running on the server, a URL may be associated to the paper content. This URL is only required by Qresp | Exploration to view images & download files using a web browser."></span></span></label></td>
									<td><input  id ='on' class="onhttp_service_path" type="checkbox" style="visibility:hidden;"></td>
									<td><input  id ='off' class="offhttp_service_path" type="checkbox" style="visibility:hidden;" checked></td>
									<td><span id="holehttp_service_path" style="margin:-12px;"></span></td>
									<td><label class="col-md-12"><span id="texthttp_service_path"></span></label></td>

								</tr>
								<tr>
									<td><label for="field1" class="col-md-12"><span>Is there a Git service running on the server?<span class="tooltipster glyphicon glyphicon-question-sign" title="If a Git service is running on the server, the user may version control the paper content."></span></span></label></td>
									<td><input  id ='on' class="ongit_service" type="checkbox" style="visibility:hidden;"></td>
									<td><input  id ='off' class="offgit_service" type="checkbox" style="visibility:hidden;" checked></td>
									<td><span id="holegit_service" style="margin:-12px;"></span></td>
									<td><label class="col-md-12"><span id="textgit_service"></span></label></td>
								</tr>
								<tr>
									<td><label for="field1" class="col-md-12"><span>Is there a Globus service running on the server?<span class="tooltipster glyphicon glyphicon-question-sign" title="The Globus service allows to download the paper content using gridFTP."></span></span></label></td>
									<td><input  id ='on' class="onglobus_service_path" type="checkbox" style="visibility:hidden;"></td>
									<td><input  id ='off' class="offglobus_service_path" type="checkbox" style="visibility:hidden;" checked></td>
									<td><span id="holeglobus_service_path" style="margin:-12px;"></span></td>
									<td><label class="col-md-12"><span id="textglobus_service_path"></span></label></td>
								</tr>
							</tbody>
						</table>
						<div class="col-md-12">
							<input type="button" style="font-weight: bold;height: 50px;" class="btn btn-theme-colored btn-lg m-0" title="Continue to Step 5." id ="Save" value="Continue" onclick="saveProjectPath('POST');"/>
                        </div>
					</form>
				</div>
                </div>
             </div>

        </div>
    </div>
    <script src="{{ url_for('static', filename='./javascript/modules/project.js') }}"></script>
        <script type="text/javascript">
        window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
        ga('create', 'UA-126882431-1', 'auto');
        ga('send', 'pageview');
    </script>
    <script async src='https://www.google-analytics.com/analytics.js'> </script>

{% endblock %}