{% extends "WallabagCoreBundle::layout.html.twig" %}

{% block title %}{{ 'import.pocket.page_title'|trans }}{% endblock %}

{% block content %}
<div class="row">
    <div class="col s12">
        <div class="card-panel settings">
            {% if not has_consumer_key %}
                <div class="card-panel red darken-1">
                    {{ 'import.pocket.config_missing.description'|trans }}

                    {% if is_granted('ROLE_SUPER_ADMIN') %}
                        {{ 'import.pocket.config_missing.admin_message'|trans({'%keyurls%': '<a href="' ~ path('craue_config_settings_modify') ~ '#set-import">', '%keyurle%':'</a>'})|raw }}
                    {% else %}
                        {{ 'import.pocket.config_missing.user_message'|trans }}
                    {% endif %}
                </div>
            {% endif %}

            <blockquote>{{ import.description|trans }}</blockquote>
            <p>{{ 'import.pocket.authorize_message'|trans }}</p>

            <form method="post" action="{{ path('import_pocket_auth') }}">
                <div class="row">
                    <div class="input-field col s6 with-checkbox">
                        <h6>{{ 'import.form.mark_as_read_title'|trans }}</h6>
                        {{ form_widget(form.mark_as_read) }}
                        {{ form_label(form.mark_as_read) }}
                    </div>
                </div>
                <button class="btn waves-effect waves-light" type="submit" name="action">
                    {{ 'import.pocket.connect_to_pocket'|trans }}
                </button>
            </form>
        </div>
    </div>
</div>
{% endblock %}
