From a5fe0cd2621660606961c81a104d72874896f26b Mon Sep 17 00:00:00 2001 From: Alanna Cao Date: Sun, 8 Dec 2024 19:22:37 -0500 Subject: [PATCH] Updated based on completed SelectFilter2 changes --- .../admin/static/admin/js/SelectFilter2.js | 62 +------------------ 1 file changed, 1 insertion(+), 61 deletions(-) diff --git a/django/contrib/admin/static/admin/js/SelectFilter2.js b/django/contrib/admin/static/admin/js/SelectFilter2.js index 8ceac94718..5b352ada2c 100644 --- a/django/contrib/admin/static/admin/js/SelectFilter2.js +++ b/django/contrib/admin/static/admin/js/SelectFilter2.js @@ -16,7 +16,6 @@ Requires core.js and SelectBox.js. from_box.id += '_from'; // change its ID from_box.className = 'filtered'; from_box.setAttribute('aria-labelledby', field_id + '_from_title'); - from_box.setAttribute('aria-labelledby', field_id + '_from_title'); for (const p of from_box.parentNode.getElementsByTagName('p')) { if (p.classList.contains("info")) { @@ -44,19 +43,11 @@ Requires core.js and SelectBox.js. selector_available_title.id = field_id + '_from_title'; selector_available_title.className = 'selector-available-title'; quickElement('label', selector_available_title, interpolate(gettext('Available %s') + ' ', [field_name]), 'for', field_id + '_from'); - const selector_available_title = quickElement('div', selector_available); - selector_available_title.id = field_id + '_from_title'; - selector_available_title.className = 'selector-available-title'; - quickElement('label', selector_available_title, interpolate(gettext('Available %s') + ' ', [field_name]), 'for', field_id + '_from'); quickElement( 'p', selector_available_title, interpolate(gettext('Choose %s by selecting them and then select the "Choose" arrow button.'), [field_name]), 'class', 'helptext' - 'p', - selector_available_title, - interpolate(gettext('Choose %s by selecting them and then select the "Choose" arrow button.'), [field_name]), - 'class', 'helptext' ); const filter_p = quickElement('p', selector_available, '', 'id', field_id + '_filter'); @@ -68,7 +59,6 @@ Requires core.js and SelectBox.js. 'span', search_filter_label, '', 'class', 'help-tooltip search-label-icon', 'aria-label', interpolate(gettext("Type into this box to filter down the list of available %s."), [field_name]) - 'aria-label', interpolate(gettext("Type into this box to filter down the list of available %s."), [field_name]) ); filter_p.appendChild(document.createTextNode(' ')); @@ -84,13 +74,6 @@ Requires core.js and SelectBox.js. 'id', field_id + '_add_all', 'class', 'selector-chooseall' ); - const choose_all = quickElement( - 'button', - selector_available, - interpolate(gettext('Choose all %s'), [field_name]), - 'id', field_id + '_add_all', - 'class', 'selector-chooseall' - ); //