fix(webform): only title on the page should be h1 (#16880)

Co-authored-by: Shariq Ansari <sharique.rik@gmail.com>
This commit is contained in:
Faris Ansari 2022-05-16 13:33:29 +05:30 committed by GitHub
parent 8a61c7489f
commit 4b13d6d7e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 8 deletions

View file

@ -8,7 +8,8 @@
.frappe-card {
padding: 1rem;
h3 {
h1 {
font-size: 1.9rem;
margin-top: 0;
margin-bottom: 0;
}

View file

@ -27,19 +27,19 @@ data-web-form="{{ name }}" data-web-form-doctype="{{ doc_type }}" data-login-req
</div>
<div class="web-form-wrapper" {{ container_attributes() }}></div>
<div id="list-filters" class="row mt-4"></div>
<div id="list-table" class="list-table pt-4 overflow-auto"></div>
<div class="list-view-footer text-right"></div>
<div id="list-filters" class="mt-4 row"></div>
<div id="list-table" class="pt-4 overflow-auto list-table"></div>
<div class="text-right list-view-footer"></div>
{% else %}
<!-- web form -->
<div class="d-flex justify-content-between web-form-head">
<h3>{{ _(title) }}</h3>
<h1>{{ _(title) }}</h1>
<div class="web-form-actions"></div>
</div>
<div role="form">
<div id="introduction" class="text-muted hidden"></div>
<div id="introduction" class="hidden text-muted"></div>
<div class="web-form-wrapper" {{ container_attributes() }}></div>
<div class="web-form-footer text-right"></div>
<div class="text-right web-form-footer"></div>
</div>
{% if show_attachments and not frappe.form_dict.new and attachments %}

View file

@ -69,7 +69,7 @@ class TestWebForm(unittest.TestCase):
def test_webform_render(self):
content = get_response_content("request-data")
self.assertIn("<h3>Request Data</h3>", content)
self.assertIn("<h1>Request Data</h1>", content)
self.assertIn('data-doctype="Web Form"', content)
self.assertIn('data-path="request-data"', content)
self.assertIn('source-type="Generator"', content)