1
If you don't follow the
XOOPS 2.6.0 development on GitHub, this is the latest update from Richard:
Quote:
HTML5 introduced many new attributes, including custom data attributes. Also, some popular javascript libraries rely on the ability to include custom attributes. The only way available to add a new or nonstandard attribute in Xoops\Form\Element was the setExtra() method. Additionally, huge amounts of code exist within the form element render methods to perform the basic task of rendering attributes.
This change introduces the following Element methods:
setAttribute() - sets a named attribute
getAttribute() - get a named attribute
hasAttribute() - determine if an named attribute exists
addAttribute() - add to a multi-valued attribute, such as class
renderAttributeString() - render all attributes to a string
These methods provide a generic mechanism to introduce any attribute into a form element without additional coding or manual building of attribute strings.
For example:
$element->addAttribute('disabled');
At present, the base Element class is converted, along with Text and direct subclasses, Button, and TextArea. Additional conversion will follow.
We encourage everybody to open an account there, and then go to
XOOPS 2.6.0 and click on the buttons:
- Watch
- Start
So you can get notified about all changes.
Also, please Fork the XOOPS 2.6.0 Core, so you can test the Core on your own, and then submit changes back to the Core Team.
If you need help in learning how to open an account on GitHub, and how to fork a repository, and how to submit changes, please let us know, and we'll be glad to help.