Commit 5ee079b 1 parent dc0c424 commit 5ee079b Copy full SHA for 5ee079b
File tree 1 file changed +3
-4
lines changed
src/moj/components/password-reveal
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1
- PasswordReveal = function ( element ) {
1
+ MOJFrontend . PasswordReveal = function ( element ) {
2
2
this . el = element ;
3
3
var $el = $ ( this . el )
4
4
@@ -14,13 +14,13 @@ PasswordReveal = function(element) {
14
14
this . createButton ( ) ;
15
15
} ;
16
16
17
- PasswordReveal . prototype . createButton = function ( ) {
17
+ MOJFrontend . PasswordReveal . prototype . createButton = function ( ) {
18
18
this . button = $ ( '<button type="button" class="govuk-button govuk-button--secondary moj-password-reveal__button">Show <span class="govuk-visually-hidden">password</span></button>' ) ;
19
19
this . container . append ( this . button ) ;
20
20
this . button . on ( 'click' , $ . proxy ( this , 'onButtonClick' ) ) ;
21
21
} ;
22
22
23
- PasswordReveal . prototype . onButtonClick = function ( ) {
23
+ MOJFrontend . PasswordReveal . prototype . onButtonClick = function ( ) {
24
24
if ( this . el . type === 'password' ) {
25
25
this . el . type = 'text' ;
26
26
this . button . html ( 'Hide <span class="govuk-visually-hidden">password</span>' ) ;
@@ -30,4 +30,3 @@ PasswordReveal.prototype.onButtonClick = function() {
30
30
}
31
31
} ;
32
32
33
- MOJFrontend . PasswordReveal = PasswordReveal
You can’t perform that action at this time.
0 commit comments