{% extends request.ajax ? "layout_blank.html.twig" : "layout_default.html.twig" %}

{% import "macro_functions.html.twig" as mf %}

{% block meta_title %}{{ 'Cookie consent settings'|trans }}{% endblock %}

{% set active_menu = 'extensions' %}

{% block content %}
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{ 'Edit cookie consent message text'|trans }}</h3>
        </div>
        <form method="post" action="{{ 'api/admin/extension/config_save'|link }}" class="api-form"
              data-api-msg="{{ 'Configuration updated'|trans }}">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-10">

                        <p>{{ 'Specify a message which will be shown to the user. The message will be shown until dismissed with the <strong>Close &times;</strong> button. An undismissed message does not affect functionality or prevent users from performing any actions.'|trans|raw }}</p>
                        <div class="alert alert-info" role="alert">
                            {{ 'If there is a need to change the way notification looks or is being displayed, you can do it by editing'|trans }}
                            <b>{{ constant('PATH_ROOT') }}/modules/Cookieconsent/html_client/mod_cookieconsent_index.html.twig</b>
                        </div>
                        {% set params = admin.extension_config_get({"ext":"mod_cookieconsent"}) %}
                        <textarea class="form-control" cols="5" rows="10" name="message" id="cookie-message"
                                  placeholder="{{ 'Add note or todo task'|trans }}">{% if params.message %}{{ params.message }}{% else %}This website uses cookies. By continuing to use this website, you consent to our use of these cookies.{% endif %}</textarea>
                    </div>
                </div>
            </div>
            <div class="card-footer text-end">
                <input type="hidden" name="ext" value="mod_cookieconsent"/>
                <button type="submit" class="btn btn-primary">{{ 'Update'|trans }}</button>
            </div>
        </form>
    </div>
{% endblock %}
