Created
July 22, 2018 22:06
-
-
Save cmaggiulli/cd202810c47832fea6b0aa8e9c5a3b87 to your computer and use it in GitHub Desktop.
Example of using Liferays JavaScript SDK to create a capslock validator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aui:script use="aui-base"> | |
var password = A.one('#<portlet:namespace />password'); | |
if (password) { | |
password.on( | |
'keypress', | |
function(event) { | |
Liferay.Util.showCapsLock(event, '<portlet:namespace />passwordCapsLockSpan'); | |
} | |
); | |
} | |
</aui:script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment