{% extends '@CoreUpdater/layout.twig' %}

{% block content %}

    <div class="header">
        <h1>{{ 'CoreUpdater_UpdateErrorTitle'|translate }}</h1>
    </div>

    <div class="content" style="text-align:left;">

        <div class="alert alert-warning">
            {{ 'CoreUpdater_UpdateUsingHttpsFailed'|translate }}<br/>
            <em>{{ error }}</em>
        </div>

        <p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelp'|translate }}</p>

        <p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelpWhatToDo'|translate }}</p>

        <form action="index.php">
            <input type="hidden" name="module" value="CoreUpdater"/>
            <input type="hidden" name="action" value="oneClickUpdate"/>
            <input type="hidden" name="https" value="1"/>
            <input type="hidden" name="nonce" value="{{ nonce|e('html_attr') }}"/>
            <input id="updateUsingHttps" class="btn" type="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
            {{ 'CoreUpdater_UsingHttps'|translate }}
        </form>
        <br/>

        <form action="index.php">
            <input type="hidden" name="module" value="CoreUpdater"/>
            <input type="hidden" name="action" value="oneClickUpdate"/>
            <input type="hidden" name="https" value="0"/>
            <input type="hidden" name="nonce" value="{{ nonce|e('html_attr') }}"/>
            <input id="updateUsingHttp" class="btn" type="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
            {{ 'CoreUpdater_UsingHttp'|translate }}
        </form>
        <br/>

        <form action="index.php">
            <input type="submit" class="btn" value="{{ 'General_ContinueToPiwik'|translate }}"/>
        </form>

    </div>

    <div class="footer">
        <a href="index.php">{{ 'General_ContinueToPiwik'|translate }}</a>
    </div>

{% endblock %}
