Skip to content

Commit 40a17e9

Browse files
committed
Fix aesthetic issues on address form
1 parent 9ef9800 commit 40a17e9

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

apps/members/forms.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ class Meta:
165165
'phone',
166166
]
167167

168-
address = forms.CharField(label='Dirección', strip=True)
169-
rest_address = forms.CharField(label='', required=False, strip=True)
168+
address = forms.CharField(label='Dirección<sup>*</sup>', strip=True)
169+
rest_address = forms.CharField(label='(extra)', required=False, strip=True)
170170
postal_code = forms.CharField(
171-
label="Cód. postal", max_length=12, strip=True
171+
label="Cód. postal<sup>*</sup>", max_length=12, strip=True
172172
)
173-
city = forms.CharField(label='Ciudad', strip=True)
173+
city = forms.CharField(label='Ciudad<sup>*</sup>', strip=True)
174174
phone = forms.CharField(label='Teléfono', required=False, strip=True)

apps/members/static/members/css/main.scss

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,12 @@
44
flex-direction: column;
55
align-items: baseline;
66
}
7+
8+
.rest-address-label {
9+
margin-top: 1rem;
10+
font-weight: 100;
11+
}
12+
13+
.phone-label {
14+
font-weight: 100;
15+
}

apps/members/templates/members/address-change.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ <h3 class="panel-heading">Dirección postal y teléfono</h3>
1717
<table class="table">
1818

1919
<tr>
20-
<th>{{ form.address.label|safe }}</th>
20+
<th>
21+
{{ form.address.label|safe }}
22+
<div class="rest-address-label">{{ form.rest_address.label|safe }}</div>
23+
</th>
2124
<td>
2225
<input name="address" class="input" type="text" value="{{ form.address.value }}">
2326
{% error_list form.address %}
@@ -42,7 +45,7 @@ <h3 class="panel-heading">Dirección postal y teléfono</h3>
4245
</tr>
4346

4447
<tr>
45-
<th>{{ form.phone.label|safe }}</th>
48+
<th class="phone-label">{{ form.phone.label|safe }}</th>
4649
<td>
4750
<input name="phone" class="input" type="text" value="{{ form.phone.value }}">
4851
{% error_list form.phone %}

0 commit comments

Comments
 (0)