- Posts: 63
- Thank you received: 1
getControlGroup is deprecated. How to override for bootstrap 4?
- Russell Leigh
- Topic Author
- Offline
- Senior Member
Everything is heavily embedded in to classes in event booking so it's really difficult to edit overrides. I feel this is quite bad practice as even joomla core components use html and therefore it's easy to overwrite and customise
How can I make this compatible with bootstrap 4?
Please Log in or Create an account to join the conversation.
- Russell Leigh
- Topic Author
- Offline
- Senior Member
- Posts: 63
- Thank you received: 1
Why is this plugin so difficult to override and not normal joomla?
Please Log in or Create an account to join the conversation.
- Russell Leigh
- Topic Author
- Offline
- Senior Member
- Posts: 63
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- Russell Leigh
- Topic Author
- Offline
- Senior Member
- Posts: 63
- Thank you received: 1
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
Everything is overidable. I don't know what you are trying to do but if you just want to make the extension compatible with twitter bootstrap 4, you do not have to do any code modification. It's supported out of the box
Just please go to Events Booking -> Configuration:
- Set Load Bootstrap CSS In The Front-end config option to No
- Set Twitter Bootstrap Version to Twitter Bootstrap 4
Then check it again and let us know if you need more help
Tuan
Please Log in or Create an account to join the conversation.
- Russell Leigh
- Topic Author
- Offline
- Senior Member
- Posts: 63
- Thank you received: 1
I want to change the classes in the inputs to form-control which is what they should be in bootstrap 4 and get rid of the horrible columns layout
I have managed to remove the columns by editing components/com_eventbooking/themes/default/fieldlayout/controlgroup.php
How can I override the classes of the input on the registration page?
How do I override the attributes variable to add my own classes?
How do I override the classes for a dropdown/select field?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
To help me understand the issue you are having, please send me link to registration form so that I can take a look at it. Please stop editing code yet. If there is something not configurable and need code customization, I will be happy to work on it and integrate it into core package.
I want to change the classes in the inputs to form-control which is what they should be in bootstrap 4 and get rid of the horrible columns layout
=> You want to add form-control as the css class of the input, correct? If so, maybe go to Events Booking -> Custom Fields, edit the custom field, set CSS Class parameter of the field to form-control, then check to see if it solves the issue?
How can I override the classes of the input on the registration page?
How do I override the attributes variable to add my own classes?
How do I override the classes for a dropdown/select field?
=> Just edit the field, set CSS Class parameter to contain the class you want.
Please look at it and let me know if it answers your questions
Tuan
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
1. The first thing you should do is configure Events Booking to use twitter bootstrap 4 as I mentioned before
- Set Load Bootstrap CSS In The Front-end config option to No
- Set Twitter Bootstrap Version to Twitter Bootstrap 4
2. Then instead of customizing the code, let me know the change you want to have it better compatible with twitter bootstrap 4. I will look at it to see if it's not configurable, I will implement it in the code so that you won't have to customize it
The extension should support twitter bootstrap 4 without any code modification
Tuan
Please Log in or Create an account to join the conversation.
- Russell Leigh
- Topic Author
- Offline
- Senior Member
- Posts: 63
- Thank you received: 1
The default layout renders as a col-md-3 with the label in it and a col-md-8 with the input in it. It looks bad. I edited controlgroup.php and removed the columns.
The rest I have done with css. Not sure why you have width: 210px !important; on all inputs?
I already have bootstrap 4 loading with my template so I'm not loading it from your plugin as well.
Your code is not very well compatible with bootstrap 4 and uses old classes and looks bad. It WORKS with bootstrap4 but I wouldn't say it's properly or very well implemented.
However, yes changing the class in the backend is the effect I wanted. Why are they called custom fields? That is confusing but it is exactly what I wanted, to set the class on the input, thanks!
tremor.local/get-involved/events
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
Sorry for lately response. I replied you, but look like it was lost (I replied at the midnight and did not check the result)
As of today, I updated the code of the extension so that it is better compatible with twitter bootstrap 4:
- Add form-control class to the text, textarea, select field type by default (so you don't have to set it manually using CSS Class setting of the field)
- Add form-check-in to checkboxes and radio field types
You can download latest package of the extension, upgrade it to your site to have the extension better compatible with twitter bootstrap 4 (without having to overriding the code)
If you still have questions or any issues with twitter bootstrap 4, feel free to let me know, I will continue working to improve it
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.