{% set current_theme = current_theme() %} {% from "macros/form_buttons.j2" import render_form_buttons %} {% from
"macros/form_errors.j2" import render_field_errors, render_form_errors %}
<!doctype html>
<html lang="{{ get_locale() }}" class="h-100">
    <head>
        {{ current_theme.headertags() }}

        <title>{{ _("Configuración de Anuncios de AdSense") }}</title>

        {{ current_theme.local_style() }}
        <!-- Custom styles for this template -->
        <link href="{{ url_for('static', filename='css/form-validation') }}" rel="stylesheet" />
    </head>

    <body>
        {{ current_theme.navbar() }}

        <main>
            {{ current_theme.notify() }} {% from "macros/demo_banner.j2" import demo_mode_banner %} {{ demo_mode_banner() }}

            <div class="container px-4 py-5" id="icon-grid">
                <h4 class="pb-2 border-bottom">{{ _("Editar configuración de anuncios de AdSense.") }}</h4>
                <form method="post">
                    <div class="row">
                        <div class="col-sm-6">
                            <h4>{{ _("Configuración de usuario de AdSense.") }}</h4>
                            <label for="email" class="form-label">{{ _("Mostrar etiqueta en Header") }}:</label>
                            {{ form.meta_tag_include() }} {{ render_field_errors(form.meta_tag_include) }}
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="meta_tag" class="form-label">{{ _("Header script") }}:</label>
                            {{ form.meta_tag(class="form-control", id="meta_tag") }} {{ render_field_errors(form.meta_tag) }}
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="pub_id" class="form-label">{{ _("ID de Usuario de AdSense") }}:</label>
                            {{ form.pub_id(class="form-control", id="pub_id") }} {{ render_field_errors(form.pub_id) }}
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <div class="col-sm-6">
                            <h4>{{ _("Configuración de anuncios en el sitio") }}.</h4>
                            <label for="show_ads" class="form-label">{{ _("Mostrar anuncios") }}:</label>
                            {{ form.show_ads() }} {{ render_field_errors(form.show_ads) }}
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="add_code" class="form-label">{{ _("Código Global de AdSense") }}:</label>
                            {{ form.add_code(class="form-control", id="add_code") }} {{ render_field_errors(form.add_code) }}
                        </div>
                    </div>

                    <br />

                    <h4>{{ _("Anuncios específicos por tamaño") }}</h4>
                    <p class="text-muted">
                        {{ _("Configure códigos de anuncios específicos para diferentes tamaños") }}. {{ _("Solo se mostrarán
                        en cursos gratuitos.") }}
                    </p>

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="add_leaderboard" class="form-label">{{ _("Leaderboard") }} (728×90):</label>
                            {{ form.add_leaderboard(class="form-control", id="add_leaderboard") }} {{
                            render_field_errors(form.add_leaderboard) }}
                        </div>
                        <div class="col-sm-6">
                            <label for="add_medium_rectangle" class="form-label">{{ _("Medium Rectangle") }} (300×250):</label>
                            {{ form.add_medium_rectangle(class="form-control", id="add_medium_rectangle") }} {{
                            render_field_errors(form.add_medium_rectangle) }}
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="add_large_rectangle" class="form-label">{{ _("Large Rectangle") }} (336×280):</label>
                            {{ form.add_large_rectangle(class="form-control", id="add_large_rectangle") }} {{
                            render_field_errors(form.add_large_rectangle) }}
                        </div>
                        <div class="col-sm-6">
                            <label for="add_mobile_banner" class="form-label">{{ _("Mobile Banner") }} (300×50):</label>
                            {{ form.add_mobile_banner(class="form-control", id="add_mobile_banner") }} {{
                            render_field_errors(form.add_mobile_banner) }}
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="add_wide_skyscraper" class="form-label">{{ _("Wide Skyscraper") }} (160×600):</label>
                            {{ form.add_wide_skyscraper(class="form-control", id="add_wide_skyscraper") }} {{
                            render_field_errors(form.add_wide_skyscraper) }}
                        </div>
                        <div class="col-sm-6">
                            <label for="add_skyscraper" class="form-label">{{ _("Skyscraper") }} (120×600):</label>
                            {{ form.add_skyscraper(class="form-control", id="add_skyscraper") }} {{
                            render_field_errors(form.add_skyscraper) }}
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <div class="col-sm-6">
                            <label for="add_large_skyscraper" class="form-label">{{ _("Large Skyscraper") }} (300×600):</label>
                            {{ form.add_large_skyscraper(class="form-control", id="add_large_skyscraper") }} {{
                            render_field_errors(form.add_large_skyscraper) }}
                        </div>
                        <div class="col-sm-6">
                            <label for="add_billboard" class="form-label">{{ _("Billboard") }} (970×250):</label>
                            {{ form.add_billboard(class="form-control", id="add_billboard") }} {{
                            render_field_errors(form.add_billboard) }}
                        </div>
                    </div>

                    <br />

                    <a class="btn btn-success" target="_blank" href="{{ url_for('setting.ads_txt') }}" role="button">
                        {{ _("Verificar archivo ads.txt") }}
                    </a>

                    <br /><br />

                    {{ render_form_buttons(_("Actualizar Configuración"), url_for('admin_profile.pagina_admin')) }}
                </form>
            </div>
        </main>
    </body>
</html>
