~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/register-step2.html -rw-r--r-- 5.8 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{% extends "layout.html" %}
{% block title %}
<title>Register for {{cfg("sr.ht", "site-name")}}</title>
{% endblock %}
{% block content %}
<div class="row">
  <div class="col-md-10 offset-md-1">
    <h3>
      Register for {{cfg("sr.ht", "site-name")}}
      <small>
        or <a href="/login">log in</a>
      </small>
    </h3>
  </div>
</div>
{% if is_external_auth() %}
<p>Registration is disabled because {{cfg("sr.ht", "site-name")}} authentication
  is managed by a different service. Please contact the system administrator
  for further information.</p>
{% elif allow_registration() or invite_hash %}
{% if cfg("meta.sr.ht::billing", "enabled") == "yes" %}
<div class="row">
  <div class="col-md-8 offset-md-2">
    <p>
      {% if payment %}
      You are registering as a <strong>maintainer</strong>. After you complete
      your registration, you will be taken to the billing page, where you'll
      be provided information on payment options, financial aid, and so on.
      <a href="{{url_for("auth.register")}}">Register as a contributor instead {{icon('caret-right')}}</a>
      {% else %}
      You are registering as a <strong>contributor</strong>, which is free but
      will limit your access to some features. After you complete registration,
      you can convert to a maintainer account by setting up billing on your
      profile at any time.
      <a href="{{url_for("auth.register")}}">Register as a maintainer instead {{icon('caret-right')}}</a>
      {% endif %}
    </p>
  </div>
</div>
{% endif %}
<div class="row">
  <div class="col-md-6 offset-md-3">
    <form method="POST" action="{{url_for("auth.register_step2_POST")}}">
      {{csrf_token()}}
      {% if invite_hash %}
      <input type="hidden" name="invite_hash" value="{{invite_hash}}" />
      <div class="alert alert-info">
        You have received a special invitation to join {{cfg("sr.ht",
        "site-name")}}. Sign up here!
      </div>
      {% endif %}
      <div class="form-group">
        <label for="username">Username</label>
        <input
           type="text"
           name="username"
           id="username"
           value="{{ username }}"
           class="form-control {{valid.cls("username")}}"
           required
           autocomplete="username"
           {% if not username %} autofocus{% endif %} />
        {{valid.summary("username")}}
      </div>
      <div class="form-group">
        <label for="email">Email address</label>
        <input
           type="email"
           name="email"
           id="email"
           value="{{ email }}"
           class="form-control {{valid.cls("email")}}"
           required
           {% if username and not email %} autofocus{% endif %} />
        {{valid.summary("email")}}
        {% if email and "+" in email %}
        <input type="hidden" name="allow-plus-in-email" value="yes" />
        <div class="alert alert-danger">
          <strong>Warning</strong>: in order to use {{cfg("sr.ht",
          "site-name")}} effectively, you must be able to both send <em>and</em>
          receive emails from this email address. To continue, submit the form
          again.
        </div>
        {% endif %}
      </div>
      <div class="form-group">
        <label for="password">Password</label>
        <input
           type="password"
           name="password"
           id="password"
           value="{{ password }}"
           class="form-control {{valid.cls("password")}}"
           required
           autocomplete="new-password"
           {% if username and email and not password %} autofocus{% endif %} />
        {{valid.summary("password")}}
      </div>
      {% if site_key %}
      <div class="form-group">
        <details>
          <summary>PGP public key (optional)</summary>
          <textarea
            class="form-control {{valid.cls("pgp-key")}}"
            id="pgp-key"
            name="pgp-key"
            style="font-family: monospace"
            rows="5"
            placeholder="gpg --armor --export-options export-minimal --export fingerprint…"
          >{{pgp_key or ""}}</textarea>
          <small class="form-text text-muted">
            Emails sent from {{cfg("sr.ht", "site-name")}} are
            signed with our PGP key:<br />
            <a href="/privacy/pubkey">{{site_key}}</a>
            <br />
            If you add your PGP key here, we will also encrypt emails sent to
            you. You may change this in your settings later, but if you enable
            it now you must be able to decrypt the confirmation email to
            complete registration.
          </small>
          {{valid.summary("pgp-key")}}
        </details>
      </div>
      {% endif %}
      <button class="btn btn-primary pull-right" type="submit">
        Register {{icon("caret-right")}}
      </button>
      <p class="clearfix"></p>
    </form>
  </div>
</div>

<div class="row">
  <div class="col-md-8 offset-md-2">
    <div class="alert alert-warning">
      <strong>Privacy notice</strong>:
      {{cfg("sr.ht", "site-name")}} collects the minimum amount of your personal
      information which is necessary to faciliate the features of our services.
      We do not collect or process any of your personal information for the
      purposes of marketing or analytics. We do not send unsolicited marketing
      emails. Your information is only shared with third-parties if it is
      necessary to facilitate our services, and you will be warned before this
      occurs and given an opportunity to prevent the transmission of your
      information.
      <a
        href="{{cfg("sr.ht", "privacy-policy", default="https://man.sr.ht/privacy.md")}}"
        rel="noopener"
        target="_blank"
      >Privacy policy {{icon('external-link-alt')}}</a>
    </div>
  </div>
</div>
{% else %}
<p>Registration is currently closed.</p>
{% endif %}
{% endblock %}