loadsys / loadsys/CakePHP-Skeleton
Add a BoostrapFormHelper
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 10
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
The current bake templates _mostly_ output Bootstrap styled code by default. One area that is weak are generated `` for add/edit. The current templates were taken from ABUS, which used the BoostCake helpers to auto-inject Bootstrap-specific settings into calls to `Form->create()`, `Form-->input()`, etc. We need something similar, but without the huge bloated, regex-powered BoostCake stuff.
I started some work on this a long time ago in what is currently `View/Helper/TwitterBootstrapHelper.php`. This is kind of a mixup of HtmlHelper and FormHelper currently. There are probably some base functions like `_buttonOptions()` that could be placed in a central class, and then break out the assistance methods for overriding `Form->create()` or Html->getCrumbs()` into respective BootstrapFormHelper and BootstrapHtmlHelper classes like in Joey's loadsys/twitter-bootstrap-helper and BoostCake, but much lighter in weight and tuned for BT3 (with no regex either).
We don't need to go for full Bootstrap feature completeness, just enough to set proper default TB3 styles for Cake's built-in helper methods and really just our bake templates (which means Form->create, input, end, button and the input subtypes like radio, checkbox, select).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with View/Helper/TwitterBootstrapHelper.php and compare its existing HtmlHelper/FormHelper mix with the listed Cake helper methods. Trace the bake templates and decide how the lightweight BootstrapFormHelper should cover create, input, end, button, radio, checkbox, and select without regex; done means those generated forms receive the intended Bootstrap 3 defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bootstrap, php
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100