Legacy Knowledge Base
Published Jun. 30, 2025

Where is the logic for handling the actions for the Terms and Conditions page?

Written By

Rita Schaff

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • We would like to override the behavior of the default Terms and Conditions that can be activated in Liferay.

  • Where is this logic located in the code?

  • How can we override it?

Environment

  • DXP 7.0+

Resolution

  • An older article: Terms of Use describes how you can set your own TOS.
  • This part of the code in our GitHub repository is responsible for creating the Terms of Service.
    It is a general journal-article based portlet.
  • Based on the following HTML code:
    <form action="/c/portal/update_terms_of_use" class="form  " data-fm-namespace="" id="fm" method="post" name="fm"><input class="field form-control" id="formDate" name="formDate" type="hidden" value="1724229542834"> <input class="field form-control" id="p_auth" name="p_auth" type="hidden" value="e5WwsChO"> <input class="field form-control" id="doAsUserId" name="doAsUserId" type="hidden" value=""> <input class="field form-control" id="referer" name="referer" type="hidden" value="/c">
    <div class="sheet-text">
    <p><span> Placeholder for Terms of Use </span></p>
    <p><span> Terms of use are shown to each user on first login. An administrative user must configure the Terms of Use at Control Panel &gt; Configuration &gt; Instance Settings. </span></p>
    </div>
    <div class="sheet-footer"><button class="btn btn-primary" type="submit">I Agree</button>
    <div class="lfr-tooltip-scope"><button class="btn btn-secondary" type="button">I Disagree</button></div>
    </div>
    </form>
    I found this line of code that seems to control the behavior, and this also lead me to UpdateTermsOfUseAction.java.
  • The button's text seems to be coming from terms_of_use.jsp.
  • If you want to override the behavior, I believe you need to override these classes and files in your implementation.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base