Giter VIP home page Giter VIP logo

Comments (8)

SanderVanLeeuwen avatar SanderVanLeeuwen commented on August 19, 2024

I'm not exactly sure what you mean. Can you provide a screenshot or refer to a specific file?

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

I think I figured out for to get around this, Not as issue any more.

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

Reopening This is what I was running into.
image

As you see in the "Lease Requirements and request" they are a separate then everything else, but apart of the "DHCP Client Configuration" section. I can add a full new separate section form them which I have done already. But doing so creates more issues with collapsing sections than it's worth.

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

What is wrong with this setup?

$group = new Form_Group('Lease Requirements and request');
$group->add(new Form_Input(...));
$group->add(new Form_Input(...));
$group->add(new Form_Input(...));
$group->add(new Form_Input(...));

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

When Inputs are in a group their label is not shown, I think that's really what needs to be fixed. So more of a labeling issue and not a group nesting issue.

Example:

image

(What's show below each Input is from setHelp())

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

Okay, and what about moving it to a separate Section? (same goes for Protocol Timing block)? I think the toggleability should work the same (not sure)?

from pfsense.

thanegill avatar thanegill commented on August 19, 2024

It works if only one input is toggling it. In this case I have two (The IPv(4/6) Configuration type and the advanced DHCP checkbox).

from pfsense.

SjonHortensius avatar SjonHortensius commented on August 19, 2024

Okay, if the IPv4 Configuration Type toggles the entire Section; then you can add a Checkbox for the advanced options (as a regular Input).

If you then add the 'advanced' class to the inputs you want to hide you can make the checkbox toggle them.

$section->addInput(new Form_Checkbox(
    'show_advanced',
    'Advanced',
    'Show advanced options'
))->setAttribute('data-toggle', 'collapse')->setAttribute('data-target', '.toggle-advanced');;

/* ... */

$group->add(new Form_Input(
    'stuff',
    'Normally hidden advanced input',
    /* stuff */
))->addClass('toggle-advanced collapse');

$group->add(new Form_Input(
    'stuff',
    'Normally hidden advanced input',
    /* stuff */
))->addClass('toggle-advanced collapse');

I did a similar setup for /system_authservers.php?act=new (check out Extended query & Anonymous bind)

from pfsense.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.