Suggestion on non "active" control groups and form layout
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)
-
repo owner -
repo owner plz use git fetch && git checkout dev-master
-
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.
-
reporter - changed status to resolved
Allow formLayout to be set on non "active" control groups, resolves issue
#33Also fixed an issue where check boxes weren't lining up correctly in FORM_LAYOUT_HORIZONTAL mode.→ <<cset 1cb02d102580>>
-
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
-
repo owner Thx great work!
-
repo owner - changed status to resolved
- Log in to comment
well this looks on a great way to save time. i will open a branch for you