Commit 2d1bb9bf by Ahsan Ulhaq

Hidden html sontent on the dashboard are rendered

ECOM-6977
parent b2385424
...@@ -800,6 +800,9 @@ def dashboard(request): ...@@ -800,6 +800,9 @@ def dashboard(request):
else: else:
redirect_message = '' redirect_message = ''
valid_verification_statuses = ['approved', 'must_reverify', 'pending', 'expired']
display_sidebar_on_dashboard = len(order_history_list) or verification_status in valid_verification_statuses
context = { context = {
'enrollment_message': enrollment_message, 'enrollment_message': enrollment_message,
'redirect_message': redirect_message, 'redirect_message': redirect_message,
...@@ -833,6 +836,7 @@ def dashboard(request): ...@@ -833,6 +836,7 @@ def dashboard(request):
'show_program_listing': ProgramsApiConfig.current().show_program_listing, 'show_program_listing': ProgramsApiConfig.current().show_program_listing,
'disable_courseware_js': True, 'disable_courseware_js': True,
'display_course_modes_on_dashboard': enable_verified_certificates and display_course_modes_on_dashboard, 'display_course_modes_on_dashboard': enable_verified_certificates and display_course_modes_on_dashboard,
'display_sidebar_on_dashboard': display_sidebar_on_dashboard,
} }
ecommerce_service = EcommerceService() ecommerce_service = EcommerceService()
......
...@@ -155,6 +155,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -155,6 +155,7 @@ from openedx.core.djangolib.markup import HTML, Text
<div id="dashboard-search-results" class="search-results dashboard-search-results"></div> <div id="dashboard-search-results" class="search-results dashboard-search-results"></div>
% endif % endif
% if display_sidebar_on_dashboard:
<div class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info"> <div class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info">
<header class="profile"> <header class="profile">
<h2 class="account-status-title sr">${_("Account Status Info")}: </h2> <h2 class="account-status-title sr">${_("Account Status Info")}: </h2>
...@@ -176,6 +177,7 @@ from openedx.core.djangolib.markup import HTML, Text ...@@ -176,6 +177,7 @@ from openedx.core.djangolib.markup import HTML, Text
</ul> </ul>
</div> </div>
</div> </div>
% endif
</div> </div>
</main> </main>
......
...@@ -173,6 +173,7 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers ...@@ -173,6 +173,7 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers
</div> </div>
% endif % endif
% if display_sidebar_on_dashboard:
<section class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info"> <section class="profile-sidebar" id="profile-sidebar" role="region" aria-label="Account Status Info">
<header class="profile"> <header class="profile">
<h2 class="account-status-title sr">${_("Account Status Info")}: </h2> <h2 class="account-status-title sr">${_("Account Status Info")}: </h2>
...@@ -194,6 +195,7 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers ...@@ -194,6 +195,7 @@ from openedx.core.djangoapps.theming import helpers as theming_helpers
</ul> </ul>
</section> </section>
</section> </section>
% endif
</section> </section>
<section id="email-settings-modal" class="modal" aria-hidden="true"> <section id="email-settings-modal" class="modal" aria-hidden="true">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment