These are chat archives for cakemanager/cakeadmin-lightstrap
First of all, you've done great commits! I think the feature adds something to the theme. On the other side we have some things do discuss ;) But keep in mind I really appreciate your work ;).
I've found the following in the CookBook: http://book.cakephp.org/3.0/en/views/helpers/form.html#adding-custom-widgets. This would make it better to add custom types, instead of your switch-case you have now...
At the moment it's possible to add a type named
ls-name. But what if an user decides to use the theme HeavyStrap? He has to change all his
hs-name and needs even to change the types in all the plugins he uses... So what do you think about the following:
ls-select- Will be default used when it's a select-box.
ls-editor- Will be default used when it's a textarea.
ls-date- Will be default used when it's a dateTime-input.
ls-color- Will be used when the class
ls-toggle- Will be default used when it's a checkbox or something?
ls-numberWill be default used when the input is an integer.
What do you think about this? When using it this way, it's easier for other themes and people to customize, and that's what we want ;).
An option could be that we will define some extra inputs in the CakeAdmin plugin (about that widgets I talked about above), and themes are able to design that widgets ;).
Please let me know what you think about it ;)
ls-selectis only for lightstrap but what happens if another theme is used?
editorsummernote will be added). This is because you want that an code-standard when you have multiple themes. All themes should work without extra code ;)
editorand summernote could come in? ;)
typethat bothers you?
Select2is a choice of the lightstrap theme.
selectis the type that should be used. Another theme could use another jquery-plugin... Same for summernote...
summernoteis a choise of the lightstrap theme.
textareais the type that should be used. Another theme could use
select2so the type
select2shouldnt be used...
ckeditorto LightStrapFormHelper.. and rename this helper to FieldTypesFormHelper