Details

      Description

      Liferay has a Liferay.SignInModal JavaScript plugin that pops up the Log In portlet in a modal. Liferay Faces should provide this plugin as a JSF component so that JSF developers do not need to handle the JavaScript and HTML boilerplate.

      The component should basically generate the following markup:

      <!--
          If the JavaScript fails for some reason, this link will provide nice fallback
          behavior by by sending the user to the login page via GET and redirecting
          them back to the current page after the user logs in.
      -->
      <a id="#{attrs.clientId}"
          href="/c/portal/login?p_l_id=#{themeDisplay.layout.plid}">#{attrs.value}</a>
      <!-- The following script can be rendered at the bottom of the page: -->
      <script type="text/javascript">
      AUI().use('liferay-sign-in-modal', 'event-outside', 'transition', function(A) {
          A.one('##{attrs.clientId.replace(":", "\\:")}').plug(Liferay.SignInModal);
          // The attributes of the modal (resetFormValidator and signInPortlet)
          // should also be settable here if they are appropriate for JSF.
          // https://github.com/liferay/liferay-portal/blob/7.0.6-ga7/modules/apps/foundation/frontend-js/frontend-js-aui-web/src/main/resources/META-INF/resources/liferay/sign_in_modal.js#L11-L18
      });
      </script>
      

      See the following StackOverflow Q&A for more details: https://stackoverflow.com/questions/50587750/how-can-i-create-a-link-button-that-pops-up-the-default-log-in-form-portlet-in-a/50587751#50587751

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: