Closed moura137 closed 10 years ago
I think this is a good start on bringing input groups into BootForms. I'm curious however why you decided to make the input group a part of the FormGroup
instead of leaving it as just another control? I think that adding it to the FormGroup
adds some unnecessary complexity and muddies the overall API. I just don't see the advantage to creating a Text
control and then converting it to an InputGroup
via the FormGroup
, why not just create an InputGroup
at the start?
The usage could change from
BootForm::text('Username', 'username')->inputGroup()->beforeAddon('@');
BootForm::text('Site', 'site')->inputGroup()->afterAddon('.com.br');
to
BootForm::inputGroup('Username', 'username')->beforeAddon('@');
BootForm::inputGroup('Site', 'site')->afterAddon('.com.br');
I'm looking forward to using this my own projects!
I thought of making this, for let free the use with other elements, example the password. Also added the builder the option of sending a class to Input Group.
BootForm::password('Password', 'password')->inputGroup('input-group-lg')->beforeAddon('ico');
How @colindecarlo said, is a start and also I look forward to using. Would like everyone's help thanks.
Would you mind resubmitting this pull request against the input-groups
branch that I just created? I will merge it in there as a starting point and we can collaborate on it until we've got something we all think is awesome and can merge into master.
Thanks for the PR man!
@adamwathan I created a branch input-groups
in my fork and did the merge.
Now I do not know how to relate in github, pull request actual need to be closed?
Can you help me what should I do?
Thanks
@moura137 yes, you're going to have to open a new pull request of your input-groups
branch against the input-groups
branch in this repo. Then either @adamwathan or yourself can close this PR. It's probably a good idea to reference this PR in the description of the new PR.
PROCESS!
No worries I was able to do it myself and push it to that branch. I'll open a PR from that branch and reference this discussion there.
Usage