MDL-56631 passwordunmask: Admin setting for password unmask not working

Andrew refactored the way it rendered the element, but did not update all the
templates (there is mforms element AND admin settings element).

See 3778a9226f for Andrews original change.
This commit is contained in:
Damyon Wiese
2016-10-31 14:45:07 +08:00
parent 577bd70d38
commit ad785e699e
2 changed files with 32 additions and 21 deletions
@@ -35,18 +35,14 @@
}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<noscript>
<!-- Backwards compatability for Behat -->
<input type="password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
>
</noscript>
<span class="visibleifjs">
<span data-passwordunmask="editor">
<!-- The input in the noscript will be moved here as part of the page load -->
<input type="hidden"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
@@ -59,6 +55,15 @@
{{# str }} passwordunmaskinstructions, form {{/ str }}
</span>
</span>
<noscript>
<!-- Backwards compatability for Behat -->
<input type="password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
>
</noscript>
</span>
</div>
{{#js}}
@@ -35,19 +35,15 @@
}}
<div class="form-password">
<span data-passwordunmask="wrapper" data-passwordunmaskid="{{ id }}">
<noscript>
<!-- Backwards compatability for Behat -->
<input type="password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
class="form-control d-inline-block"
>
</noscript>
<span class="visibleifjs">
<span data-passwordunmask="editor">
<!-- The input in the noscript will be moved here as part of the page load -->
<input type="hidden"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
class="form-control d-inline-block"
>
</span>
<a href="#" data-passwordunmask="edit" title="{{ edithint }}">
<span data-passwordunmask="displayvalue">{{> core_form/element-passwordunmask-fill }}</span>
@@ -60,6 +56,16 @@
{{# str }} passwordunmaskinstructions, form {{/ str }}
</span>
</span>
<noscript>
<!-- Backwards compatability for Behat -->
<input type="password"
name="{{ name }}"
id="{{ id }}"
value="{{ value }}"
size="{{ size }}"
class="form-control d-inline-block"
>
</noscript>
</span>
</div>
{{#js}}