Bug #10406

"Toggle All" button for radio buttons

Added by Grischa Zengel 4 months ago. Updated 4 months ago.

Web Interface
Target version:
Start date:
Due date:
% Done:


Estimated time:
Affected Version:
Affected Architecture:


"cron based reset" for PPPoE connections at interfaces.php uses radio buttons and shows Toggle All Button.

$group = new Form_MultiCheckboxGroup('cron based reset');

$group->add(new Form_MultiCheckbox(
    'Reset at each month ("0 0 1 * *")',


#1 Updated by Jim Pingle 4 months ago

  • Status changed from New to Rejected

I don't see a "Toggle All" button on the page in the source or rendered in the browser. I tried in Firefox and Chrome.

Ensure you do not have any ad blocking or script blocking browser add-ons active while viewing the GUI. If you still have problems, post on the forum to discuss the problem and try to find out what might be happening in your environment.

#2 Updated by Grischa Zengel 4 months ago

Are you sure?

I get it with Linux Firefox, Windows 10 Edge.
From different customers intranet.
Even with Netgate SG-3100 on 2.4.4 P2.

#3 Updated by Grischa Zengel 4 months ago

It should always show the button, even for you.

If I have this:

<div class="form-group pppoepreset">
    <label class="col-sm-2 control-label">
        cron based reset

    <div class="checkbox multi col-sm-10">
        <label class="chkboxlbl"><input name="pppoe_pr_preset_val" id="pppoe_pr_preset_val_monthly:d5ea" type="radio" value="monthly"> Reset at each month (&quot;0 0 1 * *&quot;)</label><label class="chkboxlbl"><input name="pppoe_pr_preset_val" id="pppoe_pr_preset_val_weekly:d5fd" type="radio" value="weekly"> Reset at each week (&quot;0 0 * * 0&quot;)</label><label class="chkboxlbl"><input name="pppoe_pr_preset_val" id="pppoe_pr_preset_val_daily:d60b" type="radio" value="daily"> Reset at each day (&quot;0 0 * * *&quot;)</label><label class="chkboxlbl"><input name="pppoe_pr_preset_val" id="pppoe_pr_preset_val_hourly:d61a" type="radio" value="hourly"> Reset at each hour (&quot;0 * * * *&quot;)</label>

This should always add the Toggle All button:

$('.control-label + .checkbox.multi').each(function() {
        var a = $('<a name="btntoggleall" class="btn btn-xs btn-info"><i class="fa fa-check-square-o icon-embed-btn"></i>Toggle All</a>');

        a.on('click', function() {
            var wrap = $(this).parents('.form-group').find('.checkbox.multi'),
                all = wrap.find('input[type=checkbox]'),
                checked = wrap.find('input[type=checkbox]:checked');

            all.prop('checked', (all.length != checked.length));

        if ( ! $(this).parent().hasClass("notoggleall")) {

#4 Updated by Grischa Zengel 4 months ago

Did you choose Pre-Set at "Periodic reset" ?

#5 Updated by Jim Pingle 4 months ago

  • Status changed from Rejected to Confirmed
  • Target version set to 2.5.0

I did, but apparently I was looking on the actual PPP interface settings page not interfaces.php. I see it there.

It's fine on interfaces_ppps_edit.php

Also available in: Atom PDF