Skip to content

Commit

Permalink
Hide 'primary' column on bp-two-factor table.
Browse files Browse the repository at this point in the history
See #3344.
  • Loading branch information
boonebgorges committed Jul 24, 2024
1 parent e630c04 commit 52752f9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions wp-content/themes/openlab/js/bp-two-factor.js
Original file line number Diff line number Diff line change
@@ -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);
5 changes: 5 additions & 0 deletions wp-content/themes/openlab/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -5771,3 +5771,8 @@ p.private-membership-indicator {
}
}
}
.two-factor-methods-table {
.col-primary {
display: none;
}
}

0 comments on commit 52752f9

Please sign in to comment.