Suggestion on non "active" control groups and form layout

Issue #33 resolved
Francis Beresford created an issue

Standard form elements currently don't seem to be fully implemented. e.g.

BSHtml::textFieldControlGroup('Name','Value',array('label'=>'My Label'));

Will not output a nicely formatted row, probably because it has no knowledge of the layout it is intended for. (i.e. has no access to $form). To get the desired result currently I need to do

<?php echo BSHtml::textFieldControlGroup('Name', 'Value', array(
    'label'=>'My Label',
    'class'=>'form-control',
    'labelOptions'=>array('class'=>'col-lg-2'),
    'controlOptions'=>array('class'=>'col-lg-10'),
    'groupOptions'=>array('class'=>'form-group'),
)) ?>

I would however prefer to do something like

<?php echo BSHtml::textFieldControlGroup('Name', 'Value', array(
    'label'=>'My Label',
    'formLayout'=>$form->layout,
)) ?>

Would you accept a pull request should I implement this feature?

Comments (7)

  1. Francis Beresford reporter

    Hi Pascal, I'm trying to push my changes to dev-master but I'm getting the error: "fatal: Authentication failed"

    I'm pretty sure I'm getting my bitbucket login credentials correct. Do I need to be "Invited to the repo" for this to work? If it's too much hassle I don't mind generating a pull request instead.

    Cheers.

  2. Francis Beresford reporter

    Allow formLayout to be set on non "active" control groups, resolves issue #33 Also fixed an issue where check boxes weren't lining up correctly in FORM_LAYOUT_HORIZONTAL mode.

    → <<cset 1cb02d102580>>

  3. Francis Beresford reporter
    • changed status to open

    Whoops accidentally automatically resolved this in my commit! I'll un-resolve and let you decide if you're happy with it Pascal :P

  4. Log in to comment