775 Commits

Author SHA1 Message Date
Cameron Ball
28e93cc41b
MDL-55324 atto_media: Implement HTML compliant media plugin
This patch completely reworks the atto media plugin to allow
insertion of HTML media elements.
2016-11-23 11:57:33 +08:00
Dan Poltawski
da55f3582b Merge branch 'MDL-56705-master' of git://github.com/damyon/moodle 2016-11-10 08:03:37 +00:00
Damyon Wiese
e7bda18de6 MDL-56705 forms: Use [] for multiple values
Some "select" based form elements are not inheriting directly from
MoodleQuickForm_select - so did not have the adjustment to the form
field name that allows multiple values. I moved this fix to the
templateable trait so all the form fields get this fix.
2016-11-10 14:57:58 +08:00
John Okely
eea9f10900 MDL-56715 form: Allow password unmask fields to be cleared in FF49 2016-11-10 11:22:59 +08:00
Rajesh Taneja
e4c98de168
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 18:06:09 +08:00
Rajesh Taneja
dc90838aaa
MDL-56630 behat: Click on link in specificed block/region 2016-11-08 14:45:43 +08:00
Damyon Wiese
9f592c243c MDL-55215 forms: Searchable selector was reindexing keys 2016-11-07 11:03:17 +08:00
Andrew Nicols
741c0e6abe MDL-55215 forms: Rename searchableselector params 2016-11-07 09:06:40 +08:00
Andrew Nicols
0e5db67d8e Merge branch 'MDL-55215-master' of git://github.com/damyon/moodle 2016-11-07 09:04:34 +08:00
Dan Poltawski
540b01b60d Merge branch 'MDL-56161-master' of git://github.com/damyon/moodle 2016-11-02 09:36:09 +00:00
Damyon Wiese
b07981e1e1 MDL-56621 forms: Give a default value if format not set
For forms with a text area, we need to provide a default for the format.
This only affects boost because it is export_for_template.
2016-11-02 14:42:33 +08:00
Damyon Wiese
9e2f13125a MDL-56161 boost: alignment static form elements
Wrap the HTML from a static form element with "form-control-static" to apply correct padding.

Also use a span, not a label for unlabelable static form elements.
2016-11-02 09:06:12 +08:00
Dan Poltawski
b9703b8e05 Merge branch 'MDL-56621-master' of git://github.com/damyon/moodle 2016-11-01 21:20:53 +00:00
Dan Poltawski
9bf205fb73 Merge branch 'MDL-55732-master' of git://github.com/damyon/moodle 2016-11-01 09:47:11 +00:00
Eloy Lafuente (stronk7)
7aa17ce256 Merge branch 'MDL-56297-master' of git://github.com/damyon/moodle 2016-10-31 19:47:40 +01:00
Damyon Wiese
2259c0f078 MDL-56621 templates: Add missing example contexts 2016-10-31 21:27:52 +08:00
Damyon Wiese
6fb8a7ab7e MDL-56621 forms: Hide format menu if only one
This was a regression in the new templates for editors.
2016-10-31 15:06:50 +08:00
Andrew Nicols
de32120676 Merge branch 'MDL-56577-master' of git://github.com/junpataleta/moodle 2016-10-31 14:02:27 +08:00
Jun Pataleta
6af2ccda91 MDL-56577 core_form: Let other option attrs to be set in select elements 2016-10-31 12:19:21 +08:00
Frédéric Massart
77bec234e0 MDL-56282 enrol_meta: Fix error when editing existing instances
We had a few problems here.

1/ The auto complete element was displaying the picker though the
   field was frozen.
2/ Checking for existing enrolment including the courses chosen was
   not checking if the courses found were in the instance we edit.
3/ Upon creation we support multiple courses but when editing we
   should not expect more than the course in the instance being edited.
2016-10-31 12:15:02 +08:00
Damyon Wiese
e2c8fb8515 MDL-55215 forms: Pass options and correctly merge choices 2016-10-28 13:23:48 +08:00
Damyon Wiese
f7ed5cee30 MDL-56171 javascript: Make searchableselector wrap autocomplete
One less yui module.

Conflicts:
	lib/upgrade.txt
2016-10-28 13:13:22 +08:00
Damyon Wiese
0f13ffbc63 MDL-56297 theme_boost: Obey usefilepicker option
URL form fields support 'usefilepicker' option to show/hide the file picker in some forms.
2016-10-28 12:57:08 +08:00
Frédéric Massart
b24212515c MDL-55732 theme_boost: Export elements separator in groups 2016-10-27 10:54:02 +08:00
Andrew Nicols
3778a9226f MDL-53048 core_form: passwordunmask must exist on page for validation
The initial approach I took was to provide a noscript area containing the
standard input element, and to move it to a hidden input element as part of
the passwordunmask setup.

This allowed behat tests to pass both with and without JS enabled (i.e.
with Goutte and real browsers), and also ensured that the real input did
not appear on screen.

However, the standard formslib validation occurs before other page JS is
run and hooks into the elements on page during its setup.
Since noscript elements are not accessible to scripts as standard elements,
the form validation would fail for _client_ side validation and work for
server-side validation.

This change creates creates the hidden input element in the template
instead, as well as the password element in the noscript tag.

Doing this means that when JS is disabled, the form has two elements of the
same name - one hidden, and the second a visible password field.
Since the latter element will always override the former one on form
submission, and the noscript variant is last, the noscript variant wins
when JS is disabled and tests continue to pass.

When JS is enabled, the noscript variant is not a valid part of the DOM
(the browser sees it as a hidden text field essentially). The password is
not automatically entered into the hidden field, so the autocomplete
prevention continues to work as expected.
2016-10-26 13:33:10 +08:00
David Monllao
48f43096e0 Merge branch 'MDL-55074-master' of git://github.com/damyon/moodle 2016-10-24 12:33:51 +08:00
David Monllao
80b74762c9 DML-53048 forms: Remove conflict resultion remaining bit
Change wrong alternative references as well.
2016-10-24 11:16:53 +08:00
Andrew Nicols
ca25005c69 MDL-53048 form: Rewrite passwordunmask
This version:
* should work with the Behat Goutte driver
* should not suffer from password autofill anxiety
* should allow unmasking (and masking) of a password
* should allow editing of passwords in either masked, or unmasked form

AMOS BEGIN
 MOV [revealpassword,core_form],[passwordunmaskrevealhint,core_form]
AMOS END
2016-10-24 09:24:39 +08:00
Damyon Wiese
ba5c5083c5 MDL-55074 theme_boost: Behat fixes for latest theme changes
Fix I edit profile steps
Apply fixed header in css
Remove transitions from menus for behat
Be more specific about some "I follow" steps
Navigation path changes
"Current course" node removed from nav tree
Adapt tests because there are no default blocks
Force some space between action menu items
2016-10-21 16:06:54 +08:00
Frédéric Massart
c9c1e4baf6 MDL-56272 theme_boost: Differentiate between freeze and hardFreeze 2016-10-21 12:41:33 +08:00
Rajesh Taneja
86ebbed6ca
MDL-56210 behat: Test for disabled button later
With phantomjs, dom is not updated by the time
next step is executed, so suffle it to ensure
this scenario pass
2016-10-05 15:45:22 +08:00
David Monllao
2e5a8fd7aa Merge branch 'wip-mdl-56210' of https://github.com/rajeshtaneja/moodle 2016-10-03 13:53:29 +08:00
Rajesh Taneja
eed52d64bb
MDL-56210 behat: Ensure behat waits for dependancy manager 2016-09-30 10:19:09 +08:00
Eloy Lafuente (stronk7)
83edfba240 MDL-56127 forms: multiple select dependencies fixed
This is a fix for a regressions introduced by MDL-54778. It
seems that escaped all our tests because there isn't any case
of such a dependency in core, but Daniele Cordella was facing
it within his surveypro module.
2016-09-29 16:53:08 +02:00
Eloy Lafuente (stronk7)
d0deb28c24 Merge branch 'MDL-55804_master' of git://github.com/dmonllao/moodle 2016-09-29 01:14:33 +02:00
David Monllao
80180e0f92 MDL-55804 forms: Return exported data through _prepareValue 2016-09-27 08:11:56 +08:00
Dan Poltawski
62398cd807 Merge branch 'wip-MDL-55519-master' of git://github.com/abgreeve/moodle 2016-09-26 15:23:32 +01:00
Damyon Wiese
e584e6ae46 MDL-55071 theme/output: PHPCS fixes for new theme branch
Part of MDL-55071
2016-09-23 10:57:36 +01:00
Damyon Wiese
e8272e748c MDL-55071 theme_boost: Fix relevant JS warnings
Part of MDL-55071
2016-09-23 10:57:36 +01:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
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
2016-09-23 10:55:16 +01:00
Frederic Massart
0f24d9cb25 MDL-55830 form: Selectgroups option values where not passed to template
Part of MDL-55071
2016-09-23 10:55:16 +01:00
Andrew Nicols
2c3a6e2479 MDL-55657 theme_noname: Use a separate template for passwordunmask
Part of MDL-55071
2016-09-23 10:55:14 +01:00
Frederic Massart
fc7f69e7e8 MDL-51948 formslib: Support forcing LTR on form elements
Part of MDL-55071
2016-09-23 10:54:49 +01:00
Damyon Wiese
d6f2ce1486 MDL-55656 theme_noname: Include advanced and required field markup
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
2016-09-23 10:53:56 +01:00
Damyon Wiese
ce18fb1e86 MDL-55417 forms: Change iscancel property to issecondary for submit buttons
This is more future proof for the template.

Part of MDL-55071
2016-09-23 10:53:31 +01:00
Damyon Wiese
7e2cd5b84e MDL-55417 forms: Improve some of the new templates for form elements
Also - un-deprecate selectwithlink (Fred convinced me).

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Damyon Wiese
97a00c9b8e MDL-55417 forms: Keep the JS for autocomplete in the template
Part of MDL-55071
2016-09-23 10:53:30 +01:00
Damyon Wiese
344321e1ef MDL-55417 forms: Clean up form element template patch
Use a trait and a base mustache template for all form elements to reduce code
duplication and increase standardisation.

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Damyon Wiese
91bda4cd45 MDL-55417 forms: Render form elements with a template
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
2016-09-23 10:53:30 +01:00
Damyon Wiese
88af020839 MDL-55411 theme_noname: Style the filepicker for bootstrap 4
Uses templates.

Part of MDL-55071
2016-09-23 10:49:49 +01:00