From 73b78efb00c7cee0e4784055b2c8da457bd854ad Mon Sep 17 00:00:00 2001 From: "jake.oeding" Date: Thu, 31 Aug 2023 10:59:03 -0400 Subject: [PATCH] make the module name label visible fixes LF-668 flag=none qa risk: low test plan: -go to a modules page -click the add module button >confirm the name field has a visible label >confirm there is no asterisk visible at the end of the label -now edit a module >confirm the name field on the edit modal also has a visible label >again confirm there is no visible asterisk Change-Id: I2b139d70ac9f12d5c81f0542bcec6cd75473f369 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/326667 Tested-by: Service Cloud Jenkins Reviewed-by: Jackson Howe QA-Review: Jackson Howe Product-Review: Jake Oeding --- .../context_modules/_add_context_module_form.html.erb | 10 +++++----- ui/shared/context-modules/jquery/index.jsx | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/context_modules/_add_context_module_form.html.erb b/app/views/context_modules/_add_context_module_form.html.erb index bc7e3cdafad..c43389d41b6 100644 --- a/app/views/context_modules/_add_context_module_form.html.erb +++ b/app/views/context_modules/_add_context_module_form.html.erb @@ -20,7 +20,7 @@
- + <%= f.text_field :name, :placeholder => t('Module Name'), :id => 'context_module_name', :class => 'ic-Input' %>
@@ -32,10 +32,10 @@
- + <%= f.text_field :unlock_at, class: "datetime_field", 'aria-labelledby' => 'unlock_at_date_label', diff --git a/ui/shared/context-modules/jquery/index.jsx b/ui/shared/context-modules/jquery/index.jsx index b3c8e2d3d96..f7edeac6945 100644 --- a/ui/shared/context-modules/jquery/index.jsx +++ b/ui/shared/context-modules/jquery/index.jsx @@ -467,6 +467,7 @@ window.modules = (function () { $module.fadeIn('fast', () => {}) $module.addClass('dont_remove') $form.find('.module_name').toggleClass('lonely_entry', isNew) + $form.find('.module_name label span').hide() // hide the asterisk in the form label const $toFocus = $('.ig-header-admin .al-trigger', $module) const fullSizeModal = window.matchMedia('(min-width: 600px)').matches const responsiveWidth = fullSizeModal ? 600 : 320