diff --git a/public_html/js/Presenters/UserPresenter.js b/public_html/js/Presenters/UserPresenter.js index 0dc0afa3..79a2b62c 100644 --- a/public_html/js/Presenters/UserPresenter.js +++ b/public_html/js/Presenters/UserPresenter.js @@ -72,12 +72,11 @@ App.Presenters.UserPresenter = function( function changeTab(targetTab) { var $link = $el.find('a[data-tab=' + targetTab + ']'); var $links = $link.closest('ul').find('a[data-tab]'); - var tab = $link.attr('data-tab'); - var $tabs = $link.closest('.tab-wrapper').find('.tab'); + var $tabs = $el.find('.tab-wrapper').find('.tab'); $links.removeClass('active'); $link.addClass('active'); $tabs.removeClass('active'); - $tabs.filter('[data-tab=' + tab + ']').addClass('active'); + $tabs.filter('[data-tab=' + targetTab + ']').addClass('active'); } return { diff --git a/public_html/templates/user.tpl b/public_html/templates/user.tpl index 7ca6d653..1d7f3ab9 100644 --- a/public_html/templates/user.tpl +++ b/public_html/templates/user.tpl @@ -8,6 +8,8 @@ <%= user.name %> + <% if ((canChangeBrowsingSettings || canChangeAccountSettings || canDeleteAccount)) { %> +