{% extends "base_firstboot.html" %}
{% comment %}
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
{% endcomment %}

{% load bootstrap %}
{% load i18n %}
{% load static %}

{% block content_row %}

  <div class="col-md-6 col-md-offset-3">
    <h2>{% trans "Setup a freedombox.me subdomain with your voucher" %}</h2>

    <p>
      {% url 'pagekite:firstboot-skip' as finish_firstboot_url %}
      {% blocktrans trimmed %}
        <a href="{{ finish_firstboot_url }}">Skip this step</a> if you
        do not have a voucher or want to configure PageKite later with a
        different domain or credentials.
      {% endblocktrans %}
    </p>

    <p>
      {% blocktrans trimmed %}
        You can use an already redeemed voucher but it will only work
        with the initially registered subdomain.
      {% endblocktrans %}
    </p>

    <form class='firstboot form-horizontal' role="form" action=""
          method="post">
      {% csrf_token %}

      {{ form|bootstrap_horizontal:'col-lg-3' }}
      <div class="form-group">
        <div class="col-sm-offset-3 col-sm-9">
          <button type="submit" class="btn btn-primary">
            {% trans "Register" %}
          </button>
          <a href="{% url 'pagekite:firstboot-skip' %}" class="btn btn-default"
             role="button">
            {% trans "Skip Registration" %}
          </a>
        </div>
      </div>
    </form>
  </div>
{% endblock %}

{% block page_js %}
  <script>
    $('#id_code').focus();
  </script>
{% endblock %}
