{% extends "base_curator.html" %}

{% block page_content %}
    <script src="{{ url_for('static', filename='./javascript/vendor/FileSaver.js') }}"></script>

    {% from "_formhelpers.html" import render_field %}
    <div class="card">
        <div class="card-body">
            <h3 data-toggle="tooltip" title="This step defines the location of the remote database where the metadata would be deposited. Google authenitcates the email address entered in this step." class="card-title" style="text-align: center;"> Save & move metadata file to a database of your choice </h3>
                    <form method="post" action="publish">
                        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
                        {{ render_field(form.server) }}
                        {{ render_field(form.emailId) }}
                        <span class="input-group-btn">
                            <input type="submit" id="btnPublish"
                                   value="Publish"
                                   class="btn btn-theme-colored btn-lg m-0"
                                   style="font-weight: bold; height: 50px;">
                            <input type="button" id="btnSkip"
                                   value="Skip"
                                   class="btn btn-theme-colored btn-lg m-0"
                                   style="font-weight: bold; height: 50px;" onclick="window.href='/acknowledgement'">
                            <a id="downloadLink" title='Download the meta data'><i class='fa fa-download' style='font-size:23px; color: #800000; margin-left: 10px;'></i></a>
                        </span>
                    </form>
        </div>
    </div>
    <script src="{{ url_for('static', filename='./javascript/modules/publish.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 %}