New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support custom confirmJs on postLink (with access to formName of parent::postLink) #381
Comments
Add-on and similar for the html link helper (2 examples)
Usage:
|
It would be easier to directly make PRs here |
Thank you, will close the issue and come back with a PR.
|
You can keep it open for now, no worries. |
Having to set |
agree, I am pretty sure to have checked this as well admad … problem I had was the missing handling of variables in templates, but will recheck if templates is supported for Forms postLink(…) … |
as far as I can see now, templates is only supported for controls. Html and Form Helper do use core implementation for |
Please open an issue for the core to allow using |
Or you can just load a templates file to override the default templates and avoid having to do so for each call. |
This is a (multiple allowed):
bug
enhancement
feature-discussion (RFC)
BootstrapUI Version: 4.0.1
Bootstrap Framework Version: 5.2.3
jQuery: -
Platform and Target: -
What you did
For modal forms, it could be useful, to have the formName (created in core postLink) for later submit from the modal available.
I tested it by overloading the helper of bootstrap-ui:
FormHelper.php:
Here a standard use-case to trigger the bootstrap modal related javascript code (showModal()) somewhere in a view template:
Advantage I would see:
Would you recommend to do a hint in the docs instead of going for this enhancement ? (I believe, using modal windows for confirm messages instead of standard ones is a very common use-case. We could also add the necessary js and modal part to the layout as an example ?)
*) credits to James McDonald for his video CakePHP 4 - Replacing the Default Javascript Confirm Dialog with a Bootstrap 5 Modal and Kevin Pfeifers comments
The text was updated successfully, but these errors were encountered: