You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.

Looking for the Diagnostic Utility?

Click Here For Download and Usage Instructions

How to Enable and Edit the Terms of Use Agreement


You want to display the Terms of Use Agreement on your PortalGuard site and allow users to accept or deny them.


Enable the Terms of Use display in the PortalGuard Configuration Editor, and modify the pg_custom.js file to change the contents.

NOTE: Improper syntax in any JavaScript changes or additions WILL break the PG Website and impact functionality. It is recommended to verify any changes on a test PortalGuard server before pushing the changes to production.

  1. In the PortalGuard Configuration Editor go to the Security Policies tab and edit the desired security policy. The desired users should fall under the scope of this policy. If multiple policies are used for a target user base, each policy will need to be configured.
  2. Select the Auditing tab and find the Terms of Use section.
  3. Check the field labeled 'Require Acceptance?' to require users to accept the Terms of Use Agreement displayed to them before being able to log in.
    • NOTE: This will only be required on their first log in and will not prompt them again following that if they have already agreed to it.
  4. The 'URL for Rejection' field must be filled with a URL that the user will be brought to if they reject the Terms of Use Agreement for any reason.
    • NOTE: This field must be populated if 'Require Acceptance?' is enabled
  5. Click the 'Save' button.
  6. From the main screen of the PortalGuard Configuration Editor, click the 'Apply to PortalGuard Server' button. 
  7. Click the 'Sync' button.

Changing the Contents of the Terms of Use Agreement

  1. Navigate to 'C:\inetpub\PortalGuard\_layouts\images\PG\js'
  2. Open the file 'pg_custom.js' using a text editor that can have administrator rights. We recommend using Notepad++.
  3. Press Ctrl+F to open the 'Find' window and enter: getCustomTOU.
  4. This will bring you to the function 'getCustomTOUTitle()' and the line below is the function 'getCustomTOUMsg()'.
  5. In the first function, getCustomTOUTitle(), you can switch out the string inside the quote with what is desired.
  6. The next function, getCustomTOUMsg() holds the contents of the Terms of Use Message. This can be customized as desired.
    • NOTE: Double quotes are the string delimiter used in that JS function. If your custom TOU text contains any double quotes, they must be replaced with either single quotes -OR- the HTML encoded version: "
  7. Once finished editing the contents of the two functions, save the file.
    • NOTE: If prompted to enter Administrative mode, click yes and save the file again.
  8. If using a long Terms of Use Agreement body, It will be beneficial to make a few changes to clean up the UI so it is easier to view. This step will add a scroll bar to just the Terms of Use Agreement instead of the entire page. The header and Agree/Disagree buttons will always be displayed, while the body of the agreement will be able to be scrolled through.
    • NOTE: This is completely optional and can be customized as desired. This is an example of what can be done and how the custom CSS can be called.
    • Open style_custom.css located in 'C:\inetpub\PortalGuard\_layouts\images\PG\css'
    • Scroll down towards the bottom of the file to the 'Additional Custom CSS' section.
    • Enter the following lines:
    • #customTOUHTML{
          height: auto;
          max-height: 50vh;
          overflow: auto;
  9. In the base 'C:\inetpub\PortalGuard' folder, there is a file titled, ''.
  10. Open this file with the same text editor as before, and change the timestamp after the PG_RSRC_TIME variable, then save the file.
    • NOTE: This will force the browser to clear it's cache and show the changes made when the site is refreshed

REV. 08/2021 | PortalGuard

  • 144
  • 25-Aug-2021