]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/people/user-edit.html
users: Move passwd handler from people
[ipfire.org.git] / src / templates / people / user-edit.html
1 {% extends "../base.html" %}
2
3 {% block title %}{{ account }} - {{ _("Edit") }}{% end block %}
4
5 {% block container %}
6 <div class="header">
7 <div class="container">
8 <h1>{{ _("Edit Profile") }}</h1>
9
10 <p class="text-muted">
11 {{ account }}
12 </p>
13 </div>
14 </div>
15
16 <div class="container">
17 <section>
18 <form method="POST" action="" enctype="multipart/form-data">
19 {% raw xsrf_form_html() %}
20
21 <div class="row mb-3">
22 <div class="col-12 col-sm-6">
23 <label class="form-label">{{ _("First Name") }}</label>
24
25 <input type="text" class="form-control" name="first_name"
26 placeholder="{{ _("First Name") }}" value="{{ account.first_name }}" required>
27 </div>
28
29 <div class="col-12 col-sm-6">
30 <label class="form-label">{{ _("Last Name") }}</label>
31
32 <input type="text" class="form-control" name="last_name"
33 placeholder="{{ _("Last Name") }}" value="{{ account.last_name }}" required>
34 </div>
35 </div>
36
37 <div class="mb-3">
38 <label class="form-label">{{ _("Nickname") }} ({{ _("optional") }})</label>
39
40 <input type="text" class="form-control" name="nickname"
41 placeholder="{{ _("Nickname") }}" value="{{ account.nickname or "" }}">
42 </div>
43
44 <div class="mb-3">
45 <label class="form-label">{{ _("Address") }}</label>
46
47 <textarea type="text" class="form-control" name="street" rows="3"
48 placeholder="{{ _("Address") }}">{{ account.street or "" }}</textarea>
49 </div>
50
51 <div class="row mb-3">
52 <div class="col-12 col-sm-6">
53 <label class="form-label">{{ _("City") }}</label>
54
55 <input type="text" class="form-control" name="city"
56 placeholder="{{ _("City") }}" value="{{ account.city }}">
57 </div>
58
59 <div class="col-12 col-sm-6">
60 <label class="form-label">{{ _("Postal Code") }}</label>
61
62 <input type="text" class="form-control" name="postal_code"
63 placeholder="{{ _("Postal Code") }}" value="{{ account.postal_code }}">
64 </div>
65 </div>
66
67 <div class="mb-3">
68 <label class="form-label">{{ _("Country") }}</label>
69
70 <select class="form-control" name="country_code">
71 <option value="">{{ _("- Please Select -") }}</option>
72
73 {% for c in countries %}
74 <option value="{{ c.alpha2 }}" {% if account.country_code == c.alpha2 %}selected{% end %}>{{ c.name }}</option>
75 {% end %}
76 </select>
77 </div>
78
79 <fieldset>
80 <legend>{{ _("Tell Us Who You Are") }}</legend>
81
82 <div class="mb-3" id="description">
83 <textarea type="text" class="form-control" name="description" rows="5"
84 placeholder="{{ _("Tell Us Who You Are") }}">{{ account.description or "" }}</textarea>
85
86 <small class="form-text text-muted">
87 {{ _("You can use Markdown syntax as you know it from the IPFire Wiki") }}
88 </small>
89 </div>
90
91 <div class="mb-3" id="avatar">
92 <label class="form-label">{{ _("Avatar") }}</label>
93
94 <input type="file" class="form-control-file" name="avatar">
95
96 <small class="form-text text-muted">
97 {{ _("Upload a new avatar") }}
98 </small>
99 </div>
100 </fieldset>
101
102 {% if account.has_mail() %}
103 <fieldset>
104 <legend>{{ _("Email") }}</legend>
105
106 <div class="mb-3">
107 <label class="form-label">{{ _("Forward Emails") }}</label>
108
109 <input type="mail" class="form-control" name="mail_routing_address"
110 placeholder="{{ _("Email Address") }}" value="{{ account.mail_routing_address or "" }}">
111
112 <small class="form-text text-muted">
113 {{ _("All emails will be forwarded to this email address") }}
114 </small>
115 </div>
116 </fieldset>
117 {% end %}
118
119 <fieldset>
120 <legend>{{ _("Telephone") }}</legend>
121
122 <div class="mb-3">
123 <label class="form-label">{{ _("Phone Numbers") }}</label>
124
125 <textarea type="text" class="form-control" name="phone_numbers" rows="3"
126 placeholder="{{ _("Phone Numbers") }}">{{ "\n".join((format_phone_number_to_e164(n) for n in account.phone_numbers)) }}</textarea>
127
128 <small class="form-text text-muted">
129 {{ _("Enter your landline and mobile phone numbers") }}
130 </small>
131 </div>
132
133 {% if account.has_sip() %}
134 <div class="mb-3">
135 <label class="form-label">{{ _("Forward Calls") }}</label>
136
137 <input type="text" class="form-control" name="sip_routing_address"
138 placeholder="{{ _("SIP URI or Phone Number") }}" value="{{ account.sip_routing_address or "" }}">
139
140 <small class="form-text text-muted">
141 {{ _("All calls will be forwarded to this phone number or SIP URI") }}
142 </small>
143 </div>
144 {% end %}
145 </fieldset>
146
147 <div class="d-grid">
148 <input class="btn btn-primary" type="submit" value="{{ _("Save") }}">
149 </div>
150 </form>
151 </section>
152 </div>
153 {% end block %}