0001-a11y-use-p-for-labels-on-summary-page-71176.patch
tests/backoffice_pages/test_submission.py | ||
---|---|---|
765 | 765 |
assert 'name="f2"' not in resp.text |
766 | 766 |
resp = resp.form.submit('submit') |
767 | 767 |
resp = resp.follow() |
768 |
assert '<span class="label">Bar</span>' in resp.text
|
|
769 |
assert '<span class="label">Foo</span>' not in resp.text
|
|
768 |
assert '<p class="label">Bar</p>' in resp.text
|
|
769 |
assert '<p class="label">Foo</p>' not in resp.text
|
|
770 | 770 | |
771 | 771 | |
772 | 772 |
def test_backoffice_submission_conditional_jump_based_on_bo_field(pub): |
tests/form_pages/test_all.py | ||
---|---|---|
7661 | 7661 |
assert 'name="f2"' not in resp.text |
7662 | 7662 |
resp = resp.form.submit('submit') |
7663 | 7663 |
resp = resp.follow() |
7664 |
assert '<span class="label">Bar</span>' in resp.text
|
|
7665 |
assert '<span class="label">Foo</span>' not in resp.text
|
|
7664 |
assert '<p class="label">Bar</p>' in resp.text
|
|
7665 |
assert '<p class="label">Foo</p>' not in resp.text
|
|
7666 | 7666 | |
7667 | 7667 | |
7668 | 7668 |
def test_field_unicode_condition(pub): |
tests/form_pages/test_live.py | ||
---|---|---|
79 | 79 |
assert 'name="f2"' not in resp.text |
80 | 80 |
resp = resp.form.submit('submit') |
81 | 81 |
resp = resp.follow() |
82 |
assert '<span class="label">Bar</span>' in resp.text
|
|
83 |
assert '<span class="label">Foo</span>' not in resp.text
|
|
82 |
assert '<p class="label">Bar</p>' in resp.text
|
|
83 |
assert '<p class="label">Foo</p>' not in resp.text
|
|
84 | 84 | |
85 | 85 |
resp = get_app(pub).get('/foo/') |
86 | 86 |
assert 'f1' in resp.form.fields |
... | ... | |
96 | 96 |
assert 'name="f2"' in resp.text |
97 | 97 |
resp = resp.form.submit('submit') |
98 | 98 |
resp = resp.follow() |
99 |
assert '<span class="label">Bar</span>' in resp.text
|
|
100 |
assert '<span class="label">Foo</span>' in resp.text
|
|
99 |
assert '<p class="label">Bar</p>' in resp.text
|
|
100 |
assert '<p class="label">Foo</p>' in resp.text
|
|
101 | 101 | |
102 | 102 | |
103 | 103 |
def test_field_live_condition_on_other_page(pub): |
wcs/fields.py | ||
---|---|---|
3926 | 3926 |
if field.extra_css_class: |
3927 | 3927 |
css_classes.append(field.extra_css_class) |
3928 | 3928 |
r += htmltext('<div class="%s">' % ' '.join(css_classes)) |
3929 |
r += htmltext('<span class="label">%s</span> ') % field.label
|
|
3929 |
r += htmltext('<p class="label">%s</p> ') % field.label
|
|
3930 | 3930 |
sub_value, sub_value_details = field.get_value_info(row_value) |
3931 | 3931 |
if sub_value is None: |
3932 | 3932 |
r += htmltext('<div class="value"><i>%s</i></div>') % _('Not set') |
wcs/forms/common.py | ||
---|---|---|
505 | 505 |
r += htmltext('<div class="dataview">') |
506 | 506 | |
507 | 507 |
if user: |
508 |
r += htmltext('<div class="field username"><span class="label">%s</span>') % _('User name')
|
|
508 |
r += htmltext('<div class="field username"><p class="label">%s</p>') % _('User name')
|
|
509 | 509 |
r += htmltext('<span class="value">%s</span></div>') % user.display_name |
510 | 510 | |
511 | 511 |
r += self.display_fields(form_url=form_url) |
... | ... | |
515 | 515 |
): |
516 | 516 |
wf_status = self.filled.get_visible_status(user=get_request().user) |
517 | 517 |
if wf_status: |
518 |
r += htmltext('<div class="field status"><span class="label">%s</span> ') % _('Status')
|
|
518 |
r += htmltext('<div class="field status"><p class="label">%s</p> ') % _('Status')
|
|
519 | 519 |
r += htmltext('<span class="value">%s</span></div>') % wf_status.name |
520 | 520 | |
521 | 521 |
r += htmltext('</div>') # .dataview |
... | ... | |
567 | 567 |
if f.key == 'block' and f.label_display == 'subtitle': |
568 | 568 |
r += htmltext('<div class="subtitle"><h4>%s</h4></div>') % f.label |
569 | 569 |
elif not (f.key == 'block' and f.label_display == 'hidden'): |
570 |
r += htmltext('<span class="label">%s</span> ') % f.label
|
|
570 |
r += htmltext('<p class="label">%s</p> ') % f.label
|
|
571 | 571 |
value, value_details = field_value_info['value'], field_value_info['value_details'] |
572 | 572 |
if value is None: |
573 | 573 |
if not (f.key == 'block' and f.label_display == 'hidden'): |
wcs/qommon/static/css/qommon.scss | ||
---|---|---|
253 | 253 |
margin: 1em 0; |
254 | 254 |
} |
255 | 255 | |
256 |
div.dataview span.label {
|
|
256 |
div.dataview .label { |
|
257 | 257 |
font-weight: bold; |
258 | 258 |
display: block; |
259 |
margin: 0; |
|
259 | 260 |
} |
260 | 261 | |
261 | 262 |
div.dataview .value { |
262 |
- |