cakephp-plugins-bootstrap4's People
cakephp-plugins-bootstrap4's Issues
Add new "confirmJS" template to templates array
Cake 3.6 and above has a new confirmJS template which needs to be added to the plugin's templates
'confirmJs' => '{{confirm}}',
Add 'type' of 'submit' to prepend/append buttons
via https://projects.lilhermit.co.uk/cakephp-plugins-bootstrap4/helpers/form.html#buttons you can append with the type of 'button', however <button>
elements won't submit the form. This also needs the 'type' option of 'submit' so you could click the appended/prepended button and actually submit the form. The rendered html would look like so:
<div class="input-group">
<input type="text" name="search" placeholder="Search for..." id="search" class="form-control">
<div class="input-group-append">
<button type="submit" class="btn btn-primary">Go</button>
</div>
</div>
Checkbox field has no visible checked state in Layout type Grid
Originally reported by Anonymous
I think there are a bug with checkbox field on layout type grid form.
My current code is :
#!php
<?= $this->Form->create($menu, [
'type' => 'post',
'url' => ['controller' => 'menus', 'action' => 'edit', $menu->id],
'layout' => ['type' => 'grid']
]) ?>
<?= $this->Form->control('nom') ?>
<?= $this->Form->control('hook') ?>
<?= $this->Form->control('active') ?>
<?= $this->Form->button($this->Icon->i('save',''), ['class' => 'btn-success pull-right']); ?>
<?= $this->Form->end(); ?>
And the checkbox field "active" (look attachment figure 1) has no visible checked state. When i click on the label, the square's style has no changing.
If i switch to layout type block or inline for form parameter, the bug is not present.
PS : I use last version 4.0.0.4001
Add ability to add custom classes to label templates
Originally reported by wilsmex (Bitbucket: wilsmex, GitHub: wilsmex)
Great plugin here. I'm wanting to build the 'horizontal' forms of BS4 instead of the vertical. This is trivial to do by adding a few classes, which I can use the custom templates to accomplish. The problem is that the 'label' template does not merge my class names. Any ideas?
#!php
<?php
return [
'formGroup' => '{{label}}<div class="col-sm-10">{{input}}</div>',
'inputContainer' => '<div class="form-group row">{{content}}{{help}}</div>',
'inputContainerError' => '<div class="form-group row has-danger">{{content}}{{error}}{{help}}</div>',
'label' => '<label{{attrs}} class="col-sm-2 text-right">{{text}}</label>',
];
?>
How can I add a red asterisk next to the label of each required field?
Originally reported by Thomas Georgiadis (Bitbucket: ThomasNucleus, GitHub: ThomasNucleus)
I'd like to add a red asterisk to the right of the label text for each required field.
How can I achieve this?
bootstrapCss/Script does not exist
With CakePHP 3.7.7 I followed the instruction here and here, but when the page loads it says:
Warning (512): Method Cake\View\Helper\HtmlHelper::bootstrapCss does not exist [CORE/src/View/Helper.php, line 117]
Warning (512): Method Cake\View\Helper\HtmlHelper::bootstrapScript does not exist [CORE/src/View/Helper.php, line 117]
Warning (512): Method Cake\View\Helper\HtmlHelper::button does not exist [CORE/src/View/Helper.php, line 117]
Is there something else I have to do?
Could you please tag this v3.7-compatible release?
Thanks
cant bake with dev-master version
Wrote /home/johnneijzen/Documents/whereabouts/src/Template/Locations/add.ctp
PHP Fatal error: Cannot redeclare getColumn() (previously declared in /home/johnneijzen/Documents/whereabouts/tmp/bake/Bake-Element-form-ctp.php:32) in /home/johnneijzen/Documents/whereabouts/tmp/bake/Bake-Element-form-ctp.php on line 39
<CakePHPBakeOpenTagphp
/**
$this->set('bakeEntities', array (
0 => 'Locations',
1 => 'Rooms',
2 => 'Buildings',
3 => 'Areas',
4 => 'Tasks',
));
CakePHPBakeCloseTag>
Fatal error: Cannot redeclare getColumn() (previously declared in /home/johnneijzen/Documents/whereabouts/tmp/bake/Bake-Element-form-ctp.php:32) in /home/johnneijzen/Documents/whereabouts/tmp/bake/Bake-Element-form-ctp.php on line 39
A little improvement in installation guide (documentation)
Originally reported by Juvenildo Vaz (Bitbucket: Juven_v, GitHub: Unknown)
In the installation guide / Configuring AppView could be have an example with initialize method (that is created by default in CakePHP). Something like that (or just a comment about):
#!php
namespace App\View;
use LilHermit\Bootstrap4\View\BootstrapView;
class AppView extends BootstrapView
{
public function initialize()
{
parent::initialize();
}
}
This is not a big problem, but makes me spend a lot of time trying figure out why plugin was not working properly.
Use of depreciated methods and depreciated parameter access
Just to start the conversation about this - noticed a few /** @noinspection PhpDeprecationInspection */
To prepare for CakePHP 4
buttonwidget?
Hi,
has this plugin something like buttonwidget or can we use bootstrap-ui along with this plugin?
https://github.com/FriendsOfCake/bootstrap-ui/blob/master/src/View/Helper/OptionsAwareTrait.php
Something along these lines, because I am using buttons but the classes don't change as expected
Date format issues when html5Render is disabled
Originally reported by Thomas Georgiadis (Bitbucket: ThomasNucleus, GitHub: ThomasNucleus)
I have the following date field:
#!php
<?=
$this->Form->control('date_of_birth', [
'type' => 'date',
'html5Render' => false,
'empty' => true,
'dateFormat' => 'DMY'
]);
?>
Having a couple issues which seem to only happen when html5Render is disabled:
First issue is I can't seem to change the format of the date. I'd like it to be DMY, however it always appears as YMD.
Second issue is the required attribute isn't being added to each of the inputs when html5Render is disabled. Required attribute is added if html5Render is enabled.
custom file form input
when I select a file via the 'custom file input' option, the filename doesn't show and it looks like no file was selected (but it does in fact work)
update bitbucket branch
update branch in bitbucket.
In cakephp 3.7 view error with not update composer change
Possible bug with hidden fields and cakephp 3.7.3
I've found an error with Cakephp 3.7.3 and this plugin (v. 4002)
I've figured out how to "fix" it doing the follow:
in FormHelper.php, line 180 public function control($fieldName, array $options = []) {
Yo have to edit the following block
$options += [ 'customControls' => $this->getConfig('customControls'), 'html5Render' => $this->getConfig('html5Render'), 'help' => false, 'prepend' => false, 'append' => false, 'gridClasses' => $this->getConfig('layout.classes.grid') ];
Add 'required' => false
$options += [ 'customControls' => $this->getConfig('customControls'), 'html5Render' => $this->getConfig('html5Render'), 'help' => false, 'prepend' => false, 'append' => false, 'required' => $this->getConfig('required'), 'gridClasses' => $this->getConfig('layout.classes.grid') ];
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.