BSHtml::checkBoxControlGroup is assuming the checkbox attribute name and label are the same thing

Issue #42 resolved
Francis Beresford created an issue

Hey Pascal, I've noticed an oversight I made when altering the checkBoxControlGroup and that is the name given as the first parameter is also used as the label. I've made a change in the code which allows you to define it as such below. Is this how you would have done it? if so which branch should I commit into. If not how would you like this to work?

<?php echo BSHtml::checkBoxControlGroup('MenuItem['.$MenuItem->Menu->name.'][include]', $menuSelected, array(
    'labelOptions'=>array(
        'label'=>'Include in this menu',
    ),
    'formLayout'=>$form->layout,
)) ?>

Comments (5)

  1. Francis Beresford reporter

    Done and in development. I looked at some other functions and have done it slightly different compared to the above to be more consistent. example below.

    <?php echo BSHtml::checkBoxControlGroup('MenuItem['.$MenuItem->Menu->name.'][include]', $menuSelected, array(
        'labelOptions'=>array(
            'class'=>'myclass',
        ),
        'label'=>'Include in this menu',
        'formLayout'=>$form->layout,
    )) ?>
    
  2. Pascal Brewing repo owner

    He sorry for long waiting much work at the moment !! Thy again for your work you are very helpfull for me and the community if you want i give you admin rights

  3. Francis Beresford reporter

    Hey Pascal, Sure! I'd be honored if you gave me admin rights. Although what kind of things would you like me to help with?

    Cheers,

  4. Log in to comment