Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-119747

The Javascript that register Liferay's form (<aui:form>) is not being executed in a custom terms_of_use.jsp

    Details

    • 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

      Description

      The Javascript that register Liferay's form (<aui:form>) is not being executed in a custom terms_of_use.jsp

      1. Deploy the .jar attached in the ticket
      2. Enable terms of use
      3. Login for the first time in Portal
      4. 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' });
      })()
      });

       

       

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            diogo.peixoto Diogo Peixoto (Inactive)
            Participants of an Issue:
            Recent user:
            Pier Nicolò Pinna
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 39 weeks, 3 days ago

                Packages

                Version Package