{{ _('Create your MDN profile to continue') }}

{% set github_connect_url = provider_login_url('github', process='connect', next=request.session.sociallogin_next_url|default('/')) %} {% set persona_login_url = url('account_login') %} {% set persona_next_url = github_connect_url %} {% if matching_accounts.exists() %}
{% trans count=matching_accounts.count(), persona_login_url=persona_login_url, persona_next_url=persona_next_url %} An account already exists with an email address below. Do you already have an MDN account? {% pluralize %} An account already exists with one of these email addresses below. Do you already have an MDN account? {% endtrans %}
{% elif account.provider == 'github' %} {# Only show this notification if we're sure it's not the Persona based MDN account #}
{% trans persona_login_url=persona_login_url, persona_next_url=persona_next_url %} Have an MDN account already? Yes, connect with my MDN account {% endtrans %}
{% endif %}

{% trans provider_name=account.get_provider().name %} Thanks for signing in to MDN with {{ provider_name }}. You have one more step to join MDN: create your MDN profile. {% endtrans %}

{% trans %} You can access everything on the MDN website even without an MDN profile. However, by joining MDN, you'll be able to edit docs, submit demos, and have your own profile page. {% endtrans %}

{% trans input_guidance=('choose a username' if form.email.field.widget.input_type == 'hidden' else 'choose a user name and email address') %} To set up your MDN profile, please {{ input_guidance }}. Your username will be displayed on MDN to identify any contributions (edits, demos, etc.) that you make. {% endtrans %}

{% trans bug_href='https://bugzilla.mozilla.org/enter_bug.cgi?assigned_to=nobody%40mozilla.org&bug_file_loc=http%3A%2F%2F&bug_ignored=0&bug_severity=normal&bug_status=NEW&cc=jkarahalis%40mozilla.com&cf_fx_iteration=---&cf_fx_points=---&component=Login&contenttypemethod=autodetect&contenttypeselection=text%2Fplain&defined_groups=1&flag_type-4=X&flag_type-607=X&flag_type-791=X&flag_type-800=X&flag_type-803=X&form_name=enter_bug&maketemplate=Remember%20values%20as%20bookmarkable%20template&op_sys=All&priority=--&product=Mozilla%20Developer%20Network&rep_platform=All&status_whiteboard=%5Btrouble-logging-in%5D&target_milestone=---&version=unspecified&format=__standard__' %} If you're having trouble signing in or creating an MDN profile, let us know. {% endtrans %}

{% if form.errors %} {% for error in form.non_field_errors() %}
{{ error }}
{% endfor %} {% endif %} {{ csrf() }} {% if redirect_field_value %} {% endif %}
  • {% if form.username.errors %} {{ form.username.errors }} {% elif matching_user %}
    • {% trans username=matching_user.username %}Your GitHub username {{ username }} is already taken. Please choose another.{% endtrans %}
    {% endif %} {{ form.username }}

    {{ _("Please enter the name you'd like to display to other users to identify your contributions.") }}

  • {# The email field is hidden if only one email is provided #} {% if form.email.field.widget.input_type == 'hidden' %} {{ form.email }} {% else %}
    • {% for error in form.email.errors %}
    • {# we have to handle this error message here to have access to the request #} {% if error == form.duplicate_email_error_label %} {% trans persona_login_url=persona_login_url, provider_name=account.get_provider().name %} A profile already exists with the selected email address. {% endtrans %} {% else %} {{ error }} {% endif %}
    • {% endfor %}
      {% set matching_uids = matching_accounts.values_list('uid', flat=True) %} {% for email_choice in form.email %} {% set id_for_label="{name}_{id}"|f(name=email_choice.name, id=loop.index0) %} {% endfor %}

    {{ _('What email address should we use to send you MDN-related messages and notifications? This address will not be displayed on MDN and will be used according to our privacy policy.')|f(privacy_url='//www.mozilla.org/privacy/websites/')|safe }}

  • {% endif %} {{ newsletter_widget(form) }}