1. BrowserKitDriver::setValue only checks if the element is
disabled. It still is able to set value on hidden elements
So there is no need for noscript tag in password unmask
2. Set size on hidden field is not valid html, so set it later
when text element is displayed
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.
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.
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.
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.
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
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
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.