~roadmr/canonical-identity-provider/webauthn-register-endpoint-part-2-the-registration

« back to all changes in this revision

Viewing changes to src/webui/templates/registration/sync_2fa.html

Merged webauthn-register-endpoint into webauthn-register-endpoint-part-2-the-registration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{% extends "base.html" %}
 
1
{% extends "vanilla/base.html" %}
2
2
 
3
3
{% load i18n %}
4
4
 
7
7
{% block extra_css %}
8
8
    {% if rpconfig and rpconfig.logo_url %}
9
9
    <style type="text/css" data-qa-id="test_2fs_rp">
10
 
        .title .trusted-rp-name {
11
 
            background-image: url('{{ rpconfig.logo_url }}');
12
 
            background-repeat: no-repeat;
13
 
            background-position: 0 100%;
14
 
            padding-left: 24px;
15
 
            padding-top: 2px;
16
 
        }
 
10
      .title .trusted-rp-name {
 
11
        background-image: url('{{ rpconfig.logo_url }}');
 
12
        background-repeat: no-repeat;
 
13
        background-position: 0 100%;
 
14
        padding-left: 24px;
 
15
        padding-top: 2px;
 
16
      }
17
17
    </style>
18
18
    {% endif %}
19
19
{% endblock %}
20
20
 
 
21
{% block content_class %}{% endblock %}
 
22
 
21
23
{% block text_title %}
22
 
    <h1 class="u1-h-main">{% trans "One account to log in to everything on Ubuntu" %}</h1>
23
 
    <h2 class="u1-h-med u1-h-pair">{% trans "Enter three consecutive verification codes" %}</h2>
 
24
  {% trans "One account for everything on Ubuntu" %}
24
25
{% endblock %}
25
26
 
26
27
{% block bodyclass %}{% endblock %}
27
28
{% block menu %}{% endblock %}
28
29
 
29
30
{% block content %}
30
 
<div class="yui3-g-r">
31
 
 
32
 
    <div id="auth" class="yui3-u-1-2">
33
 
 
34
 
        <div class="form-box">
35
 
 
36
 
            <p class="title twofactor-title" data-qa-id="ubuntu_2fsync_title">
37
 
                {% if token %}{% url 'cancel' token as cancel_url %}
38
 
                {% else %}{% url 'account-index' as cancel_url %}{% endif %}
39
 
 
40
 
                <a href="{{cancel_url}}" class="trusted-rp-name" data-qa-id="trusted_rp_2fsync">
41
 
                    {% if rpconfig and rpconfig.displayname %}
42
 
                        {{ rpconfig.displayname }}
43
 
                    {% else %}
44
 
                        Ubuntu One
45
 
                    {% endif %}
46
 
                </a><span class="action-title">{% trans "2-factor synchronization" %}</span>
47
 
            </p>
48
 
 
49
 
            <form id="sync-form" action="" method="post" name="syncform">
50
 
                {% csrf_token %}
51
 
 
52
 
                {% if form.non_field_errors %}
53
 
                <div class="input-row haserrors">
54
 
                   <span class="error">{{ form.non_field_errors|join:"" }}</span>
55
 
                </div>
56
 
                {% endif %}
57
 
 
58
 
                {% for field in form %}
59
 
                <p id="oathtoken{{ forloop.counter }}" class="input-row oath-token{% if field.errors or form.non_field_errors %} haserrors{% endif %}">
60
 
                    <label for="{{ field.id_for_label }}">{% trans "Verification code" %} {{ forloop.counter }}:</label>
61
 
 
62
 
                    {{ field }}
63
 
 
64
 
                    {% if field.errors %}
65
 
                      <span class="error">{{ field.errors|join:"" }}</span>
66
 
                    {% endif %}
67
 
                </p>
68
 
                {% endfor %}
69
 
 
70
 
                <div class="actions">
71
 
                    {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
72
 
                    <button type="submit" class="cta" name="continue" data-qa-id="sync_button">
73
 
                        <span>{% trans "Synchronize" %}</span>
74
 
                    </button>
75
 
                </div>
76
 
 
77
 
            </form>
78
 
 
79
 
        </div>
80
 
 
 
31
  <div class="row">
 
32
    <div id="auth" class="col-6">
 
33
      <h2 class="p-heading--three">{% trans "Enter three consecutive verification codes" %}</h2>
 
34
      <div class="p-card">
 
35
        <form id="sync-form" action="" method="post" name="syncform">
 
36
          {% csrf_token %}
 
37
          {% if form.non_field_errors %}
 
38
          <div class="p-notification--negative">
 
39
            <p class="p-notification__response">
 
40
              <span class="p-notification__status">Error:</span>{{ form.non_field_errors|join:"" }}
 
41
            </p>
 
42
          </div>
 
43
          {% endif %}
 
44
 
 
45
          {% for field in form %}
 
46
          <div id="oathtoken{{ forloop.counter }}" class="p-form-validation oath-token{% if field.errors or form.non_field_errors %} is-error{% endif %}">
 
47
            <label for="{{ field.id_for_label }}">{% trans "Verification code" %} {{ forloop.counter }}:</label>
 
48
            {{ field }}
 
49
            {% if field.errors %}
 
50
            <p class="p-form-validation__message">
 
51
              <strong>Error:</strong> {{ field.errors|join:"" }}
 
52
            </p>
 
53
            {% endif %}
 
54
          </div>
 
55
          {% endfor %}
 
56
 
 
57
          {% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
 
58
          <button type="submit" class="p-button--positive" name="continue" data-qa-id="sync_button">
 
59
            <span>{% trans "Synchronize" %}</span>
 
60
          </button>
 
61
        </form>
 
62
      </div>
81
63
    </div>
82
 
 
83
 
    <div class="yui3-u-1-3">
84
 
 
 
64
    <div class="col-5 col-start-large-8">
 
65
      <aside class="p-table-of-contents">
85
66
        {% include "registration/two_factor_information.html" %}
86
 
 
 
67
      </aside>
87
68
    </div>
88
 
 
89
 
</div>
 
69
  </div>
90
70
{% endblock %}
91
71
 
92
72
{% block extra_js %}
93
 
{% include "common/sync_2fa_javascript.html" %}
 
73
  {% include "common/sync_2fa_javascript.html" %}
94
74
{% endblock %}