jQuery validation and more
-
Dashboard cached assets are stored within the
application/cache/assets
folder instead of Skeleton's to allow multiple applications sharing the same installation. -
Added the
do_extension
method to Theme library so that extensions are put back in case of usingno_extension
method first.
$this->theme->no_extension()->add(...);
// Right after do:
$this->theme->do_extension();
- Added jQuery validation library and automatic messages generation from set rules. when using the
prep_form
method, pass your form jQuery selector as the second argument. If you want to apply filters to the plugins parameters, pass the filter suffix as the third parameter (option because it will be automatically generated if not provided):
$this->prep_form($rules, $selector, $filter);
// Example
$this->prep_form(array(
array('field' => 'username',
'label' => 'Username', // Or: "lang:username"
'rules' => 'trim|required|min_length[5])
), '#login');
// To add a filter (example: submitHanlder):
add_filter('jquery_validate_submitHandler-login', function ($handler) {
// Do whatever you want as long as you return it.
});
-
Functions with
safe_
as prefix were renamed tononce_
for better understanding but old ones were kept for backward compatibility (safe_url
→nonce_url
). -
Modules dashboard links can have their submenus displayed if defined in their
manifest.json
files and they can even be translated:
{
"submenu": {
"uri1": "Title 1",
"uri2": "Title 2"
},
"translations": {
"uri1": {
"french": "Anything",
"arabic": "Bla Bla bla"
}
}
}
-
KB_Image_lib.php
added for better image resizing/cropping. See example of usage. -
Fixed issue with
Kbcore_entities.php
library not applyingurl_title
to usernames. -
Added jQuery validation to
Admin.php
controllers of the following modules:settings
,users
,menus
andmedia
. -
Fixed CodeIgniter typo #5462.