{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "users/base.html" %}
{% from "layout/errorlist.html" import errorlist %}
{% set title = _('Register') %}
{% set classes = 'register' %}
{% set use_browserid = LANG|lower in config.BROWSERID_LOCALES.split(' ') %}

{% block content %}
<section id="content">
  <div class="wrap">
    <div id="content-main" class="full">
      <article id="register" class="main" data-browserid-signin-html="{{ url('users.browserid_signin_html') }}">
        <h1>{{ _('Register') }}</h1>
        <p>{% trans %}
          You can access everything on the MDN website even without an account, but 
          when you join you'll be able to edit docs, submit demos, and have your 
          own profile page. 
        {% endtrans %}</p>
        
        <form class="boxed" method="post" action="">
          {{ csrf() }}
          {{ errorlist(form) }}
          <ul>
            {% for field in form %}
              <li>{{ field|label_with_help }} {{ field|safe }}</li>
            {% endfor %}
            <li class="submit"><button type="submit">{{ _('Register') }}</button></li>
          </ul>
        </form>
      </article>
    </div>
   </div>
</section>
{% endblock %}

{% block js %}
{% if use_browserid %}
<script type="text/javascript">
  $('article.main').load($('article.main').attr('data-browserid-signin-html'), bindBrowserIDSignin);
</script>
{% endif %}
{% endblock %}
