We add a new theme config so the theme can say it supports font-awesome.
If this is true, the pix_icon renderer will call a mapping function to map
from the moodle style t/edit to a font-awesome style fa-cog icon name. Then the renderer
will either render an image tag for old icons - or an accessible font-awesome <i> tag.
This mostly works - but there are some places where we don't use the pix icon renderer, and
we directly create image tags with pix_url image sources. These will need updating (Atto icons,
drag and drop move icons, editpdf icons).
In getValidationScript function variable $element can be an array or object.
Function attempt get non-existing attributes.
To avoid this we should check before accessing.
This was half-finished and only used for the smartselect enhancement. That
enhancement doesn't work with theme_boost and is better replaced just
using the searchableselector element.
If the plugin is using namespaces instead of frankenstyle class name,
get_called_class() will return 'type\name' instead of 'type_name'.
Added code to replace backslashes to underscores and fix that issue.
If two instances of moodleforms are validated in the same run, most
likely a phpunit test run, it would store the first validation result.
Now it stores the validation result per instance, not for all instances.
This is a squash of many small fixes.
The list of changes are:
Initial set of behat selectors overrides required for new theme.
set core behat selectors if not overridden by theme
Remove pause
Fix for checkboxes not saving properly
Custom override for click in the user menu
Fix for behat guessing the field type.
Behat fix for guessing the correct field type.
Fix for missing closeElementBefore mforms mess.
Fix for textareas not displaying their contents.
Fix availability form element
Fix action menu selectors for activities in a course page
Fix textareas not retaining their values
Fix selector for blocks
I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.
Fix for frozen attribute in form elements
Use input instead of button while behat is still broken
Fix for navigation selector override
Behat selector fixes and multi-select fixes for templated select
Fix for configure blocks selector + booleans for autocomplete
Fixes for course_summary behat tests
Allow optgroups in single_select
Behat fixes for block_navigation
Fixes for url form element and activity chooser selectors
blocks_social - fix specific selector for behat
Fix export_for_template for selectgroups element.
Dont set empty id on the form
Fix direct call to behat_navigation in backup context
Checkbox empty value fix
Fix for assign grading panel popouts
file picker overrides to find a file manager in the page
Fix chat tests to use element name
Make selectors in mod_data behat less specific
MDL-55839: recent activity behat test relies on time()
SQUASH Honour mform element "class" attribute on the container
SQUASH Fixes for behat in mod_forum
SQUASH search form template showing value as text next to the button
SQUASH undo double selectgroup fix
SQUASH - The slightly different structure to action menus breaks course drag and drop
SQUASH Wrap loading icon in a span so the selector still works.
SQUASH Fix fragile javascript in report_loglive
SQUASH Fix tabtree, and selectgroups for mod_feedback
Also - do-not enhance the action menu - we are dropping support for this.
SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.
SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)
SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.
SQUASH Fix lti behat tests - they were cheating and using a context step from quiz
SQUASH Behat fixes for quiz with new theme
SQUASH behat fixes for mod_wiki
SQUASH Workshop behat fixes
SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.
SQUASH Fixes for grades behat tests
SQUASH behat fixes for groups
SQUASH blacklist action menu tests
SQUASH Fix for tag form element missing "manage standard tags" link
SQUASH Incomplete fixes for course behat tests
SQUASH behat fixes for badges
SQUASH Tags fixes for behat
SQUASH filepicker fixes for behat
SQUASH Abort guessing field type when we hit 'html'
SQUASH Fix for admin/tool/behat tests
SQUASH fix for admin tool behat tests
SQUASH fix for availabilty conditions hiding "aria-hidden" elements
SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view
SQUASH Blocks fixed
Fix behaviour of unchecked checkboxes
SQUASH Remove incorrect step in user test
SQUASH behat fixes for course tests
Part of MDL-55071
The new form elements were not including the markup for advanced
and required fields. I used an <abbr> tag in the label to give
and accessible indication of the advanced and required fields.
Part of MDL-55071
This change allows form elements to be overridden with a mustache template.
The template can even listen for form validation errors and supply the JS to
change the look of the form element when there is/isn't a validation error.
Initial support is for all core form elements including:
text, select, selectyesno and checkboxes, groups, dateselector, datetimeselector,
autocomplete, modvisible, advcheckbox, button, duration, filemanager, filepicker, editor, static, grading,
warning, textarea, password, url, submit, questioncategory, recaptcha.
Part of MDL-55071
The previous commit "Automatically sync editor with its textarea" was
found a not good solution as the onchange event is triggered way less
often than needed for our needs. So this reverts commit 34321d49.
Instead, we add a hack to the formslib so that when there are some
TinyMCE editors used at the page, we explicitly save them before
triggering the form validation. This simply calls save() on all editors
on the page - see the API reference:
http://archive.tinymce.com/wiki.php/API3:method.tinymce.triggerSave
Having TinyMCE hardcoded like this on this core level does not make me
happy. But it seems to be most effective solution for now (and
definitely more efficient than the previous solution). Plus there is a
precedence - we already use window.tinyMCE in formchangechecker.js YUI
module, for example.
So when language is different say Hebrew then
it would pic codepage-1255. As is json_encoded
we need to ensure we get utf8 string. so use
date_format_string instead
In MDL-45772 a hack was introduced to some forms to stop browsers from
putting the user's password into password fields in forms unrelated to
logging in.
Chrome now no longer fills the user's password in the first password
field in the page. There now needs to be a plain text input above it
for the username too.
This is a squashed commit containing a number of changes:
This is an ajax driven course selector that has searching etc. It can select single, or multiple courses.
Make course selector accept a list of courses to exclude
courseselector - lookup coursename on setValue
Use the get_course_display_name_in_list function to generate the course names
Add a throttle to auto-complete to reduce spamming the server
Do a single query to fetch all the courses in the mform element when validation fails
Fix core course search function to return results when there are less than 2 chars in the query.
Handle setData with an empty array in new course selector
This patch fixes the problem of client validation being broken when
shortforms is not enabled. This issue is caused by moodle-core-event
module not being loaded and the broadcast parameter in the
Y.Global.publish set to 2 instead of true.