-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathform.html
179 lines (173 loc) · 9.43 KB
/
form.html
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
{% extends "base.html" %}
{% block main %}
<form id="install_form" action="/" method="POST" novalidate class="mt-5">
<div class="row justify-content-center">
<div class="col-lg-8 col-sm-10 mb-3">
<div class="card">
<h4 class="card-header">{{ _("Server configuration") }}</h4>
<div class="alert alert-info card-header">
<i class="fa fa-info-circle" aria-hidden="true"></i>
{{ _("This is the domain that will be used to name and reach your internet cube. If you do not already own a domain name, you can pick a free domain ending with .nohost.me, .noho.st or .ynh.fr. It will automatically be configured during the setup.") }}
</div>
<div class="card-body">
<div class="form-group row">
<label for="main_domain" class="col-3 col-form-label">{{ _("Main domain") }}</label>
<div class="col-9">
<input type="text" class="validate form-control" name="main_domain" id="main_domain" placeholder="{{ _("myserver.nohost.me") }}" pattern="^([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+([^\W\d_]{2,})$">
<div class="invalid-feedback default">
{{ _("Please specify a valid domain") }}
</div>
</div>
</div>
<div class="subscribe-password-div">
<div class="form-group row">
<div class="alert alert-info card-header">
<i class="fa fa-info-circle" aria-hidden="true"></i>
{{ _("This kind of domain is freely provided by the YunoHost project. Please remember the password you enter, it will be used to keep control of the domain even if you loose control of your server.") }}
</div>
<label for="domain_password" class="col-3 col-form-label">{{ _("Domain password") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="domain_password" id="domain_password" pattern="^.{8,}$">
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
</div>
</div>
<div class="form-group row">
<label for="domain_password_repeat" class="col-3 col-form-label">{{ _("Domain Password (repeat)") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="domain_password_repeat" id="domain_password_repeat" pattern="^.{8,}$" custom-validation>
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
<div class="invalid-feedback nomatch">
{{ _("Passwords do not match") }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-sm-10 mb-3">
<div class="card">
<h4 class="card-header">{{ _("First user (administrator)") }}</h4>
<div class="card-body">
<div class="form-group row">
<label for="username" class="col-3 col-form-label">{{ _("Username") }}</label>
<div class="col-9">
<input type="text" class="validate form-control" name="username" id="username" placeholder="{{ _("sasha") }}" pattern="^[a-z0-9_]{3,}$">
<div class="invalid-feedback default">
{{ _("Please specify a valid username with at least three characters (only lowercase, numbers or _)") }}
</div>
</div>
</div>
<div class="form-group row">
<label for="fullname" class="col-3 col-form-label">{{ _("Full name") }}</label>
<div class="col-9">
<input type="text" class="validate form-control" name="fullname" id="fullname" placeholder="{{ _("Sasha Doe") }}" pattern="^([^\W\d_]{2,30}[ ,.'-]{0,3})+$">
</div>
</div>
<div class="form-group row">
<label for="password" class="col-3 col-form-label">{{ _("Password") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="password" id="password" pattern="^.{8,}$">
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
</div>
</div>
<div class="form-group row">
<label for="password_repeat" class="col-3 col-form-label">{{ _("Password (repeat)") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="password_repeat" id="password_repeat" pattern="^.{8,}$" custom-validation>
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
<div class="invalid-feedback nomatch">
{{ _("Passwords do not match") }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-sm-10 mb-3">
<div id="vpn" class="card">
<h4 class="card-header">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="enable_vpn" id="enable_vpn" checked="">
<label class="custom-control-label" for="enable_vpn">{{ _("VPN configuration") }}</label>
</div>
</h4>
<div class="collapse alert alert-info card-header">
<i class="fa fa-info-circle" aria-hidden="true"></i>
{{ _("Using a VPN allows for easier setup (no need to manually forward ports), bypasses any possible restrictions from your commercial ISP (such as blocking outgoing port 25 for emails).") }}
</div>
<div class="collapse show card-body">
<div class="form-group row">
<label for="cubefile" class="col-3 col-form-label">{{ _(".cube file") }}</label>
<div class="custom-file col-9">
<input type="file" class="validate custom-file-input" name="cubefile" id="cubefile" accept=".cube" custom-validation>
<label class="custom-file-label" for="cubefile">{{ _("Choose file") }}</label>
<div class="invalid-feedback default">
{{ _("You must provide a valid .cube file to enable the VPN") }}
</div>
<div class="invalid-feedback invalidjson">
{{ _("Could not load this file as json ... Is it a valid .cube file ?") }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-sm-10 mb-3">
<div id="wifi" class="card">
<h4 class="card-header">
<div class="custom-control custom-switch">
<input type="checkbox" class="custom-control-input" name="enable_wifi" id="enable_wifi" checked="">
<label class="custom-control-label" for="enable_wifi">{{ _("Wifi Hotspot configuration") }}</label>
</div>
</h4>
<div class="collapse alert alert-info card-header">
<i class="fa fa-info-circle" aria-hidden="true"></i>
{{ _("If a VPN is configured, clients connected to the hotspot will have their traffic routed through the VPN, providing them with IPv6 and protecting their connection against censorship/spying from your commercial ISP.") }}
</div>
<div class="collapse show card-body">
<div class="form-group row">
<label for="wifi_ssid" class="col-3 col-form-label">{{ _("Name (SSID)") }}</label>
<div class="col-9">
<input type="text" class="validate form-control" name="wifi_ssid" id="wifi_ssid" placeholder="{{ _("myNeutralNetwork") }}">
</div>
</div>
<div class="form-group row">
<label for="wifi_password" class="col-3 col-form-label">{{ _("Password") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="wifi_password" id="wifi_password" pattern="^.{8,}$">
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
</div>
</div>
<div class="form-group row">
<label for="wifi_password_repeat" class="col-3 col-form-label">{{ _("Password (repeat)") }}</label>
<div class="col-9">
<input type="password" class="validate form-control" name="wifi_password_repeat" id="wifi_password_repeat" pattern="^.{8,}$" custom-validation>
<div class="invalid-feedback default">
{{ _("Passwords must be at least 8 characters") }}
</div>
<div class="invalid-feedback nomatch">
{{ _("Passwords do not match") }}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-8 col-sm-10 mb-5 text-center">
<div id="submit_error" class="text-danger mb-2" style="display: none;"></div>
<button type="submit" class="btn btn-primary"><i class="fa fa-rocket" aria-hidden="true"></i> {{ _("Let's go!") }}</button>
</div>
</div>
</form>
{% endblock %}