Logs for #cakephp

Page 6 of 36,195, showing 100 records out of 3,619,426 total, starting on record 501, ending on 600

# At Username Text
# Jul 15th, 20:57 ricksaccous strange
# Jul 15th, 20:57 ricksaccous you were just following the docs
# Jul 15th, 20:57 ricksaccous oh wait lmao
# Jul 15th, 20:57 ricksaccous but probably $this->addPlugin('Sequence'); will just work
# Jul 15th, 20:56 ricksaccous you should learn about namespacing
# Jul 15th, 20:54 yamcomnet not sure how this plugin business goes nowadays. It added $this->addPlugin('Admad/sequence) to Application.php but i keep getting Fatal error: Uncaught Cake\Core\Exception\MissingPluginException: Plugin Admad/sequence could not be found. in
# Jul 15th, 20:39 yamcomnet what do you do when non programmer starts to do business software :)
# Jul 15th, 20:38 yamcomnet made the frontend and was not able to do actual algo :)
# Jul 15th, 20:38 yamcomnet actually thats exactly what i need. Cheers!
# Jul 15th, 20:37 challgren That plugin will be helpful then
# Jul 15th, 20:36 yamcomnet thanks guys! I need to store new prioritys to database after sorting
# Jul 15th, 20:35 ricksaccous @yamcomnet this is what i was talking about https://api.jqueryui.com/sortable/
# Jul 15th, 20:35 ricksaccous that's a handy behavior
# Jul 15th, 20:33 challgren https://github.com/ADmad/cakephp-sequence
# Jul 15th, 20:32 ricksaccous you take that in and set priority numbers based on those
# Jul 15th, 20:32 ricksaccous then it serializes them all
# Jul 15th, 20:32 ricksaccous there are jquery ui libs that allow you to just get all the image ids if you put them in some data attribute
# Jul 15th, 20:31 yamcomnet basic programming question follows(which im not able to solve properly :slightly_smiling_face:. I have images sorted by priority. User clicks up/down arrows. I want to reorder prioritys. Whats the approach for the algo?
# Jul 15th, 18:50 daniel.upshaw I was thinking about control instantiation
# Jul 15th, 18:50 daniel.upshaw Actually I think you're right, yeah
# Jul 15th, 18:49 daniel.upshaw Or what works that is
# Jul 15th, 18:49 daniel.upshaw Okay, I'm really curious if this works
# Jul 15th, 18:49 daniel.upshaw Or that perhaps
# Jul 15th, 18:49 daniel.upshaw ```<?php // Using a classname. $this->Form->addWidget( 'ToggleInput', ['widgets' => ['Theme.ToggleInput', 'checkbox', 'nestingLabel']] );```
# Jul 15th, 18:49 ricksaccous i'll try that later though
# Jul 15th, 18:49 ricksaccous I think if anything would work it would be this
# Jul 15th, 18:49 daniel.upshaw Hmmm
# Jul 15th, 18:48 slackebot <ricksaccous>
# Jul 15th, 18:48 daniel.upshaw (Just guessing here)
# Jul 15th, 18:47 daniel.upshaw ```[ 'widgets' => [ 'toggleInput' => ['Theme\View\Widget\ToggleInput', 'nestingLabel'] ] ]```
# Jul 15th, 18:47 daniel.upshaw It might not be exactly that though
# Jul 15th, 18:46 daniel.upshaw @ricksaccous I wonder if that would modify `$_defaultWidgets`
# Jul 15th, 18:46 daniel.upshaw ```[ 'widgets' => [ 'toggleInput' => ['nestingLabel'] ] ]```
# Jul 15th, 18:45 daniel.upshaw https://book.cakephp.org/3.0/en/views/helpers/form.html#using-widgets
# Jul 15th, 18:45 ricksaccous anyway an element is not a bad solution imo
# Jul 15th, 18:44 ricksaccous yeah I'm not going to mess with formHelper just to get what i want out of this widget, lol
# Jul 15th, 18:43 daniel.upshaw I think that `$_defaultWidgets` looks promising
# Jul 15th, 18:43 daniel.upshaw But this is your custom
# Jul 15th, 18:43 daniel.upshaw Ah
# Jul 15th, 18:43 daniel.upshaw `By default CakePHP nests checkboxes created via control() and radio buttons created by both control() and radio() within label elements.`
# Jul 15th, 18:42 daniel.upshaw https://book.cakephp.org/3.0/en/views/helpers/form.html#moving-checkboxes-radios-outside-of-a-label
# Jul 15th, 18:42 daniel.upshaw For `control()`
# Jul 15th, 18:42 daniel.upshaw By default it's supposed to use `nestingLabel`
# Jul 15th, 18:41 daniel.upshaw I wonder if that controls what uses nestingLabel
# Jul 15th, 18:40 ricksaccous yes
# Jul 15th, 18:40 daniel.upshaw That's in `Cake\View\FormHelper`
# Jul 15th, 18:40 slackebot ['Textarea'], 'datetime' => ['DateTime', 'select'], '_default' => ['Basic'], ];```
# Jul 15th, 18:40 daniel.upshaw ``` /** * Default widgets * * @var array */ protected $_defaultWidgets = [ 'button' => ['Button'], 'checkbox' => ['Checkbox'], 'file' => ['File'], 'label' => ['Label'], 'nestingLabel' => ['NestingLabel'], 'multicheckbox' => ['MultiCheckbox', 'nestingLabel'], 'radio' => ['Radio', 'nestingLabel'], 'select' => ['SelectBox'], 'textarea' =>
# Jul 15th, 18:40 ricksaccous and for regular checkboxes not using my widget it uses nestingLabel
# Jul 15th, 18:40 ricksaccous there's magic in formhelper that decides which label widget/template it uses
# Jul 15th, 18:40 daniel.upshaw Hrm
# Jul 15th, 18:39 daniel.upshaw Oh
# Jul 15th, 18:39 ricksaccous and i don't know how to specify that
# Jul 15th, 18:39 daniel.upshaw Why not keep everything "toggleWidget"
# Jul 15th, 18:39 ricksaccous but i want the control to use nestingLabel
# Jul 15th, 18:39 ricksaccous it uses 'label'
# Jul 15th, 18:39 ricksaccous except the stupid label
# Jul 15th, 18:39 daniel.upshaw Hmmm
# Jul 15th, 18:39 daniel.upshaw ``` $templates->add( [ 'inputContainer' => $templates->get('toggleWidget'), 'checkbox' => $templates->get('toggleWidgetCheckbox'), 'nestingLabel' => $templates->get('nestingLabelToggleWidget') ] );```
# Jul 15th, 18:39 ricksaccous and they are being used
# Jul 15th, 18:39 ricksaccous yes, with the templates predefined
# Jul 15th, 18:38 daniel.upshaw Oooh I see you're making a custom type
# Jul 15th, 18:38 daniel.upshaw Nice
# Jul 15th, 18:38 ricksaccous and i can't put a hidden field there
# Jul 15th, 18:38 ricksaccous it's using the actual "label" widget/template
# Jul 15th, 18:38 ricksaccous no, the problem is my widget is not using the correct template/widget for label
# Jul 15th, 18:37 daniel.upshaw But when you specify it in each control, it works?
# Jul 15th, 18:37 daniel.upshaw Is the problem that it changes everywhere?
# Jul 15th, 18:37 daniel.upshaw So when you change it
# Jul 15th, 18:36 ricksaccous you can't stick hidden inputs in there though
# Jul 15th, 18:36 daniel.upshaw ``` // Input group wrapper for checkboxes created via control(). 'checkboxFormGroup' => '{{label}}',```
# Jul 15th, 18:36 daniel.upshaw Do you have that in there?
# Jul 15th, 18:36 daniel.upshaw ``` // Wrapper container for checkboxes. 'checkboxWrapper' => '<div class="checkbox">{{label}}</div>',```
# Jul 15th, 18:35 ricksaccous give it a try yourself on your cake installation and see
# Jul 15th, 18:35 ricksaccous yeah, but it does use it for checkboxes
# Jul 15th, 18:34 daniel.upshaw Doesn't seem to mention checkbox there
# Jul 15th, 18:34 daniel.upshaw ``` // Label element used for radio and multi-checkbox inputs. 'nestingLabel' => '<label{{attrs}}>{{hidden}}{{input}}{{text}}</label>',```
# Jul 15th, 18:34 ricksaccous it's the easiest way for now
# Jul 15th, 18:34 daniel.upshaw Hmm
# Jul 15th, 18:33 ricksaccous lol
# Jul 15th, 18:33 ricksaccous screw it i'm just going to make it an element
# Jul 15th, 18:33 ricksaccous ugh
# Jul 15th, 18:32 ricksaccous template/widget
# Jul 15th, 18:32 ricksaccous and not the other one
# Jul 15th, 18:32 ricksaccous i just want the label to use the nestingLabel template
# Jul 15th, 18:32 daniel.upshaw Even globally?
# Jul 15th, 18:32 daniel.upshaw Oh
# Jul 15th, 18:32 ricksaccous i already have the container working mang
# Jul 15th, 18:31 daniel.upshaw `'checkboxContainer' => '<div class="checkbox{{required}}">{{content}}</div>{{helptext}}',`
# Jul 15th, 18:31 daniel.upshaw This
# Jul 15th, 18:31 daniel.upshaw Not that
# Jul 15th, 18:31 daniel.upshaw Oops
# Jul 15th, 18:31 ricksaccous but these sliders are used throughout so if i can make them a widget it would help
# Jul 15th, 18:31 daniel.upshaw `'inputContainer' => '<div class="form-group input {{type}}{{required}}">{{content}}{{helptext}}</div>',`
# Jul 15th, 18:31 daniel.upshaw Maybe try this
# Jul 15th, 18:31 ricksaccous i just use the templates, and they work fine for that
# Jul 15th, 18:30 ricksaccous the default checkboxes i already have working
# Jul 15th, 18:30 ricksaccous it's the sliders
# Jul 15th, 18:30 ricksaccous but it's not the default checkboxes
# Jul 15th, 18:30 ricksaccous some bootstrap related theme