{% load i18n %}

<p>
    {% blocktrans %}
    Please specify a coordinate in right ascension (RA) and declination (DEC) and a cone radius. The query will result in objects that have coordinates in the search cone.
    {% endblocktrans %}
</p>

<p>
    {% blocktrans %}
    Optionally, you can specify the name of the resulting database table and/or asign a run id, to group associated queries in the job list. Please choose a queue with a suitable timeout for your query.
    {% endblocktrans %}
</p>

<div class="row fieldset">
    <div class="col-md-4">
        <formgroup
            data-type="text"
            data-label="{% trans 'RA (degrees)' %}"
            data-model="service.forms.cone.values.ra"
            data-errors="service.forms.cone.errors.ra">
        </formgroup>
    </div>
    <div class="col-md-4">
        <formgroup
            data-type="text"
            data-label="{% trans 'DE (degrees)' %}"
            data-model="service.forms.cone.values.de"
            data-errors="service.forms.cone.errors.de">
        </formgroup>
    </div>
    <div class="col-md-4">
        <formgroup
            data-type="text"
            data-label="{% trans 'Radius (arcsec)' %}"
            data-model="service.forms.cone.values.radius"
            data-errors="service.forms.cone.errors.radius">
        </formgroup>
    </div>
</div>

<div class="row">
    <formgroup
        class="col-md-6"
        data-type="text"
        data-label="{% trans 'Table name' %}"
        data-model="service.forms.cone.values.table_name"
        data-errors="service.forms.cone.errors.table_name">
    </formgroup>
    <formgroup
        class="col-md-3"
        data-type="text"
        data-label="{% trans 'Run id' %}"
        data-model="service.forms.cone.values.run_id"
        data-errors="service.forms.cone.errors.run_id">
    </formgroup>
    <formgroup
        class="col-md-3"
        data-type="select"
        data-label="{% trans 'Queue' %}"
        data-model="service.active_queue"
        data-options="service.queues"
        data-options-label="text">
    </formgroup>
</div>

<button class="btn btn-primary" ng-click="service.forms.cone.submit()">
    {% trans 'Submit new cone search' %} <submitting />
</button>

<p class="text-danger" ng-show="service.forms.cone.errors.detail">
    {$ service.forms.cone.errors.detail $}
</p>
<p class="text-danger" ng-show="service.forms.cone.errors.server_error">
    {% trans 'There has been an error on the server. Please contact the maintainers of this site, if the problem persists.' %}
</p>
