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

{% 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="{{ 'extension/config_save'|api_url }}" {{ fb_api_form({message: '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 effect functionality or prevent users from performing any actions.'|trans|raw }}</p>
                        <div class="alert alert-info" role="alert">
                            <strong class="me-1">{{ 'Information:'|trans }}</strong>{{ 'If there is a need to change the way notification looks or is being displayed, you can do it by editing'|trans }}
                            <code>{{ constant('PATH_ROOT') }}/modules/Cookieconsent/templates/client/mod_cookieconsent_index.html.twig</code>
                        </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 %}
