From 52752f9762854f1c1461a0b433c22e7ecb91047d Mon Sep 17 00:00:00 2001 From: Boone B Gorges Date: Tue, 23 Jul 2024 20:02:45 -0500 Subject: [PATCH] Hide 'primary' column on bp-two-factor table. See #3344. --- wp-content/themes/openlab/js/bp-two-factor.js | 23 +++++++++++++++++++ wp-content/themes/openlab/style.less | 5 ++++ 2 files changed, 28 insertions(+) create mode 100644 wp-content/themes/openlab/js/bp-two-factor.js diff --git a/wp-content/themes/openlab/js/bp-two-factor.js b/wp-content/themes/openlab/js/bp-two-factor.js new file mode 100644 index 0000000000..f4cf1874ac --- /dev/null +++ b/wp-content/themes/openlab/js/bp-two-factor.js @@ -0,0 +1,23 @@ +(function($){ + $(document).ready(function(){ + // Figure out the position of the 'col-primary' column. It doesn't have + // the proper class in the table body. + var col; + $('.two-factor-methods-table thead th').each(function( k, v ){ + console.log(v) + if ( $(v).hasClass('col-primary') ) { + col = k; + return false; + } + }); + + if ( col !== undefined ) { + console.log('col: ' + col); + $('.two-factor-methods-table tbody tr').each(function(){ + var $thisRowChildren = $(this).children(); + $thisRowChildren.eq(col).addClass('col-primary'); + }); + } + + }); +})(jQuery); diff --git a/wp-content/themes/openlab/style.less b/wp-content/themes/openlab/style.less index b7b8b59b7b..64979ad289 100644 --- a/wp-content/themes/openlab/style.less +++ b/wp-content/themes/openlab/style.less @@ -5771,3 +5771,8 @@ p.private-membership-indicator { } } } +.two-factor-methods-table { + .col-primary { + display: none; + } +}