<commit_before>{% extends 'accounting/subscriptions_base.html' %}
{% load crispy_forms_tags %}
{% load hq_shared_tags %}
{% load i18n %}

{% block js %}{{ block.super }}
    <script src="{% static 'accounting/js/stay-on-tab.js' %}"></script>
{% endblock %}

{% block js-inline %}{{ block.super }}
    {% if disable_cancel %}
        <script>
            $("#cancel_form :input").attr("disabled", true);
        </script>
    {% endif %}
{% endblock %}

{% block main_column %}
    <ul class="nav nav-tabs" id="user-settings-tabs">
        <li><a href="#subscription" data-toggle="tab">{% trans "Subscription" %}</a></li>
        <li><a href="#credits" data-toggle="tab">{% trans "Credits" %}</a></li>
        <li><a href="#actions" data-toggle="tab">{% trans "Permanent Actions" %}</a></li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane" id="subscription">
            {{ block.super }}
        </div>

        <div class="tab-pane" id="credits">
            {% include 'accounting/credits_tab.html' %}
        </div>

        <div class="tab-pane" id="actions">
            <div class="alert alert-error">
                Do this ONLY if absolutely necessary.
                Do not cancel subscriptions just to change start dates.
                Canceling will have real time effects to the domain like
                shutting off reminders.
            </div>
            <form class="form form-horizontal" method="post" id="cancel_form">
                {% crispy cancel_form %}
            </form>
            {% if subscription_canceled %}
                Subscription has been canceled.
            {% elif disable_cancel %}<commit_msg>display cancellation text as an alert<commit_after>{% extends 'accounting/subscriptions_base.html' %}
{% load crispy_forms_tags %}
{% load hq_shared_tags %}
{% load i18n %}

{% block js %}{{ block.super }}
    <script src="{% static 'accounting/js/stay-on-tab.js' %}"></script>
{% endblock %}

{% block js-inline %}{{ block.super }}
    {% if disable_cancel %}
        <script>
            $("#cancel_form :input").attr("disabled", true);
        </script>
    {% endif %}
{% endblock %}

{% block main_column %}
    <ul class="nav nav-tabs" id="user-settings-tabs">
        <li><a href="#subscription" data-toggle="tab">{% trans "Subscription" %}</a></li>
        <li><a href="#credits" data-toggle="tab">{% trans "Credits" %}</a></li>
        <li><a href="#actions" data-toggle="tab">{% trans "Permanent Actions" %}</a></li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane" id="subscription">
            {{ block.super }}
        </div>

        <div class="tab-pane" id="credits">
            {% include 'accounting/credits_tab.html' %}
        </div>

        <div class="tab-pane" id="actions">
            <div class="alert alert-error">
                Do this ONLY if absolutely necessary.
                Do not cancel subscriptions just to change start dates.
                Canceling will have real time effects to the domain like
                shutting off reminders.
            </div>
            <form class="form form-horizontal" method="post" id="cancel_form">
                {% crispy cancel_form %}
            </form>
            {% if subscription_canceled %}
                <div class="alert">
                  Subscription has been canceled.
                </div>
            {% elif disable_cancel %}
{'fraction_non_alphanumeric': 0.16476774758983348, 'fraction_numerical': 0.0011685655857434998, 'mean_word_length': 2.224105461393597, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1371267', 'n_tokens_mistral': 1067, 'n_tokens_neox': 978, 'n_words': 248}