<commit_before>{% extends 'base.html' %}

{% load i18n %}
{% load tags %}
{% load bootstrap_toolkit %}
{% load django_bootstrap_breadcrumbs %}
{% load common_tags %}
{% load astrobin_apps_equipment_tags %}

{% block title %}{% trans "Edit your image: acquisition details" %}{% endblock %}
{% block container_extra_classes %}has-subnav{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb 'Image' None %}
    {% breadcrumb image.title|default:_("(no title)") 'image_detail' image.get_id %}
    {% breadcrumb 'Acquisition details' None %}
{% endblock %}


{% block content %}
    {% include 'image/edit/menu.html' %}

    {% if edit_type == 'solar_system' %}
        <form
                class="form-horizontal"
                id="image_acquisition"
                action="{% url 'image_edit_save_acquisition' %}"
                method="post"
                novalidate>
            {% csrf_token %}
            {{ ssa_form|as_bootstrap }}
            <input type="hidden" name="image_id" value="{{ image.get_id }}" />
            <input type="hidden" name="edit_type" value="solar_system" />
            <div class="form-actions">
                <button class="btn btn-primary btn-block-mobile {% button_loading_class %}" type="submit">
                    {% trans "Save" %}
                    {% button_loading_indicator %}
                </button>

                <a class="btn btn-danger btn-block-mobile"
                   href="{% url 'image_edit_acquisition_reset' image.get_id %}" data-no-instant>
                    <i class="icon-exclamation-sign"></i>
                    {% trans "Remove data" %}
                </a>

                <a class="btn btn-block-mobile" href="{{ image.get_absolute_url }}">{% trans "Cancel" %}</a>
            </div>
        </form>
    {% else %}
        {% if edit_type == 'deep_sky' %}
            {% if advanced or request.GET.advanced == 'true' %}
                <div class="subtitle">
                    <i class="icon icon-info-sign"></i>
                    {% blocktrans trimmed %}
                        You can insert as many acquisition sessions as you want, as often images are taken across
                        several nights. An acquisition session is defined primarily by a date and a filter. Fill in your
                        data and then click on <strong>Save</strong> to finish, or on <strong>Add more</strong> to add
                        more acquisition sessions.
                    {% endblocktrans %}
                    {% url 'image_edit_acquisition' image.get_id as basic_form_url %}
                    {% blocktrans trimmed %}
                        Is this too much data for you to handle? Go to the
                        <a class="button" href="{{ basic_form_url }}?edit_type=deep_sky&advanced=false" data-no-instant>
                            basic form</a>.
                    {% endblocktrans %}
                </div>

                <form class="form-horizontal" id="image_acquisition" action="{% url 'image_edit_save_acquisition' %}"
                      method="post" novalidate>{% csrf_token %}
                    {% for form in deep_sky_acquisitions %}
                        {% if image.user|is_own_equipment_migrator and form.filter_2.field.queryset.count == 0 %}
                            <div class="alert alert-warning">
                                <i class="icon-warning-sign"></i>
                                {% blocktrans trimmed %}
                                    Filters are not available because you didn't add any to the equipment list of this
                                    image.
                                {% endblocktrans %}
                            </div><commit_msg>(images) Do not display "no filters available" warning when there are legacy filters available<commit_after>{% extends 'base.html' %}

{% load i18n %}
{% load tags %}
{% load bootstrap_toolkit %}
{% load django_bootstrap_breadcrumbs %}
{% load common_tags %}
{% load astrobin_apps_equipment_tags %}

{% block title %}{% trans "Edit your image: acquisition details" %}{% endblock %}
{% block container_extra_classes %}has-subnav{% endblock %}

{% block breadcrumbs %}
    {{ block.super }}
    {% breadcrumb 'Image' None %}
    {% breadcrumb image.title|default:_("(no title)") 'image_detail' image.get_id %}
    {% breadcrumb 'Acquisition details' None %}
{% endblock %}


{% block content %}
    {% include 'image/edit/menu.html' %}

    {% if edit_type == 'solar_system' %}
        <form
                class="form-horizontal"
                id="image_acquisition"
                action="{% url 'image_edit_save_acquisition' %}"
                method="post"
                novalidate>
            {% csrf_token %}
            {{ ssa_form|as_bootstrap }}
            <input type="hidden" name="image_id" value="{{ image.get_id }}" />
            <input type="hidden" name="edit_type" value="solar_system" />
            <div class="form-actions">
                <button class="btn btn-primary btn-block-mobile {% button_loading_class %}" type="submit">
                    {% trans "Save" %}
                    {% button_loading_indicator %}
                </button>

                <a class="btn btn-danger btn-block-mobile"
                   href="{% url 'image_edit_acquisition_reset' image.get_id %}" data-no-instant>
                    <i class="icon-exclamation-sign"></i>
                    {% trans "Remove data" %}
                </a>

                <a class="btn btn-block-mobile" href="{{ image.get_absolute_url }}">{% trans "Cancel" %}</a>
            </div>
        </form>
    {% else %}
        {% if edit_type == 'deep_sky' %}
            {% if advanced or request.GET.advanced == 'true' %}
                <div class="subtitle">
                    <i class="icon icon-info-sign"></i>
                    {% blocktrans trimmed %}
                        You can insert as many acquisition sessions as you want, as often images are taken across
                        several nights. An acquisition session is defined primarily by a date and a filter. Fill in your
                        data and then click on <strong>Save</strong> to finish, or on <strong>Add more</strong> to add
                        more acquisition sessions.
                    {% endblocktrans %}
                    {% url 'image_edit_acquisition' image.get_id as basic_form_url %}
                    {% blocktrans trimmed %}
                        Is this too much data for you to handle? Go to the
                        <a class="button" href="{{ basic_form_url }}?edit_type=deep_sky&advanced=false" data-no-instant>
                            basic form</a>.
                    {% endblocktrans %}
                </div>

                <form class="form-horizontal" id="image_acquisition" action="{% url 'image_edit_save_acquisition' %}"
                      method="post" novalidate>{% csrf_token %}
                    {% for form in deep_sky_acquisitions %}
                        {% if not form.filter.field.queryset.count and not form.filter_2.field.queryset.count %}
                            <div class="alert alert-warning">
                                <i class="icon-warning-sign"></i>
                                {% blocktrans trimmed %}
                                    Filters are not available because you didn't add any to the equipment list of this
                                    image.
                                {% endblocktrans %}
                            </div>
{'fraction_non_alphanumeric': 0.12002110261144816, 'fraction_numerical': 0.0009232392508572936, 'mean_word_length': 1.6449250087199163, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1553072', 'n_tokens_mistral': 2151, 'n_tokens_neox': 1881, 'n_words': 505}