-
Type:
Bug
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: 7.2.10 DXP FP7
-
Fix Version/s: None
-
Component/s: JS APIs and Utilities
-
Labels:None
-
Story Points:1
The Javascript that register Liferay's form (<aui:form>) is not being executed in a custom terms_of_use.jsp
- Deploy the .jar attached in the ticket
- Enable terms of use
- Login for the first time in Portal
- Run Liferay.Form on console developer mode (Google Chrome)
Expected result:
Liferay.Form should return a function
() { component.superclass.constructor.apply(this, arguments); }
Actual result:
Liferay.Form is returning undefined
The Javascript that registers form is on page source, however, is not being called.
AUI().use('aui-tooltip', 'liferay-menu', 'liferay-notice', 'aui-base', 'liferay-form', 'liferay-session', 'liferay-poller', function(A) { (function() { var $ = AUI.$;var _ = AUI._; Liferay.Form.register({ id: 'fm', fieldRules: [], validateOnBlur: true }); var onDestroyPortlet = function(event) { if (event.portletId === 'terms-of-use') { delete Liferay.Form._INSTANCES['fm']; } }; Liferay.on('destroyPortlet', onDestroyPortlet); Liferay.fire('formReady', { formName: 'fm' }); })() });