~cytrogen/srht-deploy

ref: 098f0ded66b5f614ec99f0d3efb89b3a5b1bc0f6 srht-deploy/meta-custom/templates/register-step2.html -rw-r--r-- 5.2 KiB
098f0ded — Cytrogen 初始提交:sourcehut Docker Compose 自托管部署 10 days 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
{% extends "layout.html" %}
{% block title %}
<title>注册 - {{cfg("sr.ht", "site-name")}}</title>
{% endblock %}
{% block content %}
<div class="row">
  <div class="col-md-10 offset-md-1">
    <h3>
      注册 {{cfg("sr.ht", "site-name")}}
      <small><a href="/login">登录</a>
      </small>
    </h3>
  </div>
</div>
{% if is_external_auth() %}
<p>注册已禁用,{{cfg("sr.ht", "site-name")}} 的认证由其他服务管理。
  请联系系统管理员了解详情。</p>
{% elif allow_registration() %}
{% if cfg("meta.sr.ht::billing", "enabled") == "yes" %}
<div class="row">
  <div class="col-md-10 offset-md-1">
    <p>
      {% if payment %}
      你正在注册为<strong>维护者</strong>。完成注册后,你将前往账单页面了解付款方式和减免政策。
      <a href="{{url_for("auth.register")}}">改为注册贡献者 {{icon('caret-right')}}</a>
      {% else %}
      你正在注册为<strong>贡献者</strong>,免费但部分功能受限。
      完成注册后,你可以随时在个人设置中转换为维护者账户。
      <a href="{{url_for("auth.register")}}">改为注册维护者 {{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()}}
      <div class="form-group">
        <label for="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">邮箱地址</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>警告</strong>:要正常使用 {{cfg("sr.ht",
          "site-name")}},你必须能够使用此邮箱地址收发邮件。
          如确认无误,请再次提交表单。
        </div>
        {% endif %}
      </div>
      <div class="form-group">
        <label for="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
          {% if valid.cls("pgpKey") == "is-invalid" %}
          open
          {% endif %}
        >
          <summary>PGP 公钥(可选)</summary>
          <textarea
            class="form-control {{valid.cls("pgpKey")}}"
            id="pgpKey"
            name="pgpKey"
            style="font-family: monospace"
            rows="5"
            placeholder="gpg --armor --export-options export-minimal --export fingerprint…"
          >{{pgpKey or ""}}</textarea>
          <small class="form-text">
            {{cfg("sr.ht", "site-name")}} 发出的邮件使用以下 PGP 密钥签名:<br />
            <a href="/privacy/pubkey">{{site_key}}</a>
            <p>
              如果你在此添加 PGP 公钥,我们还会对发给你的邮件进行加密。
              你可以稍后在设置中修改。
            </p>
            <p>
              <strong class="text-danger">重要!</strong>
              如果你现在提供了 PGP 公钥,你必须能够解密确认邮件才能完成注册。
            </p>
          </small>
          {{valid.summary("pgpKey")}}
        </details>
      </div>
      {% endif %}
      <button class="btn btn-primary pull-right" type="submit">
        注册 {{icon("caret-right")}}
      </button>
      <p class="clearfix"></p>
    </form>
  </div>
</div>

<div class="row">
  <div class="col-md-8 offset-md-2">
    {{valid.summary()}}
  </div>
</div>

<div class="row">
  <div class="col-md-10 offset-md-1">
    <div class="alert alert-warning">
      <strong>隐私声明</strong>{{cfg("sr.ht", "site-name")}} 仅收集提供服务所必需的最少个人信息。
      我们不会为营销或数据分析目的收集或处理你的个人信息,也不会发送营销邮件。
      你的信息仅在为提供服务所必需时才会与第三方共享,
      且在此之前会通知你并给予你阻止信息传输的机会。
      <a
        href="{{cfg("sr.ht", "privacy-policy", default="https://man.sr.ht/privacy.md")}}"
        rel="noopener"
        target="_blank"
      >隐私政策 {{icon('external-link-alt')}}</a>
    </div>
  </div>
</div>
{% else %}
<p>注册当前已关闭。</p>
{% endif %}
{% endblock %}