0

Hide the Wrench

Is there a script that can be added in a formula that will hide the Wrench?  Similar to the Trash, Copy and other icons top right.

5 replies

null
    • Sean
    • 1 yr ago
    • Reported - view

    You can with this,

    html("
        <style>
            .hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}
        </style>
    ")
    

    but it will only work when the Form where the Formula field is is open. You can put this in Trigger after open,

    dialog("Hide Wrench", html("<script>
        var styleSheet = document.styleSheets[2];
        styleSheet.insertRule('.hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:none;}');
        var interval = setInterval(() => {
            var bt = document.querySelector('.nx-alert .nx-button-text');
            if (bt) {
                bt.click();
                clearInterval(interval);
            }
        });
    </script>"), ["close"])
    

    but then you'll either have to edit the database file manually to to make Admin button display again or set up a way to show the Admin button in a Formula field which kind of defeats the purpose unless you hide it.

    • Sean
    • 1 yr ago
    • Reported - view

    If you use the Trigger after open version you can put this in a Formula field and if it isn't hidden and the Form is open it will show the wrench.

    html("
        <style>
            .hud-menu-button.i-32-24.i-white.i-setting-tool.--ul-admin-button.admin-button{display:inline;}
        </style>
    ")
    
    • Alan_Cooke
    • 1 yr ago
    • Reported - view

    Thanks all!!

    • Michael_Riley
    • 1 yr ago
    • Reported - view

    Additional related question:

    can you hide the calendar button?

      • Sean
      • 1 yr ago
      • Reported - view

      Michael Riley Yes, this can be done.

      This thread has that info. You don't need to use multiple dialogs if you have more than one rule. Just add stylesheet.insertrule() to any other rules that exist.

Content aside

  • 1 yr agoLast active
  • 5Replies
  • 172Views
  • 4 Following