]> git.ipfire.org Git - ipfire.org.git/blob - src/templates/people/user-edit.html
people: Fix "None" showing when street is empty
[ipfire.org.git] / src / templates / people / user-edit.html
1 {% extends "base.html" %}
2
3 {% block title %}{{ account }} - {{ _("Edit") }}{% end block %}
4
5 {% block main %}
6 <h4 class="mb-4">{{ _("Edit") }}</h4>
7
8 <form method="POST" action="" enctype="multipart/form-data">
9 {% raw xsrf_form_html() %}
10
11 <div class="form-row mb-3">
12 <div class="col">
13 <label>{{ _("First Name") }}</label>
14
15 <input type="text" class="form-control" name="first_name"
16 placeholder="{{ _("First Name") }}" value="{{ account.first_name }}" required>
17 </div>
18
19 <div class="col">
20 <label>{{ _("Last Name") }}</label>
21
22 <input type="text" class="form-control" name="last_name"
23 placeholder="{{ _("Last Name") }}" value="{{ account.last_name }}" required>
24 </div>
25 </div>
26
27 <div class="form-group">
28 <label>{{ _("Address") }}</label>
29
30 <textarea type="text" class="form-control" name="street" rows="3"
31 placeholder="{{ _("Address") }}">{{ account.street or "" }}</textarea>
32 </div>
33
34 <div class="form-row mb-3">
35 <div class="col">
36 <label>{{ _("City") }}</label>
37
38 <input type="text" class="form-control" name="city"
39 placeholder="{{ _("City") }}" value="{{ account.city }}">
40 </div>
41
42 <div class="col">
43 <label>{{ _("Postal Code") }}</label>
44
45 <input type="text" class="form-control" name="postal_code"
46 placeholder="{{ _("Postal Code") }}" value="{{ account.postal_code }}">
47 </div>
48 </div>
49
50 <div class="form-group">
51 <label>{{ _("Country") }}</label>
52
53 <select class="form-control" name="country_code">
54 <option value="">{{ _("- Please Select -") }}</option>
55
56 {% for c in countries %}
57 <option value="{{ c.alpha2 }}" {% if account.country_code == c.alpha2 %}selected{% end %}>{{ c.name }}</option>
58 {% end %}
59 </select>
60 </div>
61
62 <div class="form-group">
63 <label>{{ _("Avatar") }}</label>
64
65 <input type="file" class="form-control-file" name="avatar">
66
67 <small class="form-text text-muted">
68 {{ _("Upload a new avatar") }}
69 </small>
70 </div>
71
72 {% if account.has_mail() %}
73 <fieldset>
74 <legend>{{ _("Email") }}</legend>
75
76 <div class="form-group">
77 <label>{{ _("Forward Emails") }}</label>
78
79 <input type="mail" class="form-control" name="mail_routing_address"
80 placeholder="{{ _("Email Address") }}" value="{{ account.mail_routing_address or "" }}">
81
82 <small class="form-text text-muted">
83 {{ _("All emails will be forwarded to this email address") }}
84 </small>
85 </div>
86 </fieldset>
87 {% end %}
88
89 <fieldset>
90 <legend>{{ _("Telephone") }}</legend>
91
92 <div class="form-group">
93 <label>{{ _("Phone Numbers") }}</label>
94
95 <textarea type="text" class="form-control" name="phone_numbers" rows="5"
96 placeholder="{{ _("Phone Numbers") }}">{{ "\n".join((format_phone_number_to_e164(n) for n in account.phone_numbers)) }}</textarea>
97
98 <small class="form-text text-muted">
99 {{ _("Enter your landline and mobile phone numbers") }}
100 </small>
101 </div>
102
103 {% if account.has_sip() %}
104 <div class="form-group">
105 <label>{{ _("Forward Calls") }}</label>
106
107 <input type="text" class="form-control" name="sip_routing_address"
108 placeholder="{{ _("SIP URI or Phone Number") }}" value="{{ account.sip_routing_address or "" }}">
109
110 <small class="form-text text-muted">
111 {{ _("All calls will be forwarded to this phone number or SIP URI") }}
112 </small>
113 </div>
114 {% end %}
115 </fieldset>
116
117 <input class="btn btn-primary btn-block" type="submit" value="{{ _("Save") }}">
118 </form>
119 {% end block %}