Keyword

Turn off options that are disabled categories for front end

  • Eoin Feeney
  • Eoin Feeney's Avatar Topic Author
  • Offline
  • Premium Member
More
8 years 7 months ago #147048 by Eoin Feeney
For a front end login, the categories show whether the users can access them or not.

Instead of having them appear as greyed out, which is confusing, why don't you use "display: hidden" on them. I don't really want them to see all of my categories anyway, some of them are private, this is a real issue when it comes to disclosure.

Image I have a category for each client that only they can see, K2 would tell all of my clients who each client is, that's not really acceptable.

I believe this code would work.

select option:disabled {
display:none;
}

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 7 months ago #147161 by Krikor Boghossian
Replied by Krikor Boghossian on topic Turn off options that are disabled categories for front end
It will work but not on all browsers.
A jQuery script would make this cross browser compatible.

Use something like this as a base to build your own script
(function($){
  $(document).ready(function(){
    $('[disabled="true"]​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​')​.remove();
  });
})(jQuery);

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum