<?xml version="1.0" encoding="utf-8"?>
  <finScript version="1.00" exportedUtcDate="2024-07-17T04:42:37.0000000">
    <CreatedUserId>ADMIN</CreatedUserId>
    <CreatedUtcDate>2024-05-30T22:14:26.0880000</CreatedUtcDate>
    <UpdatedUserId>ADMIN</UpdatedUserId>
    <UpdatedUtcDate>2024-07-17T04:42:07.9970000</UpdatedUtcDate>
    <ScriptId>HWCCAS</ScriptId>
    <Description>Cost Centre Edit (Adobe Sign)</Description>
    <ScriptType>HtmlWidget</ScriptType>
    <Active>true</Active>
    <AllowUI>false</AllowUI>
    <Bookmarks />
    <Category />
    <Code>' HtmlWidget_CostCentreEdit_AdobeSign
Option Explicit On
Option Strict On

' #################################################################
' Cost Centre Edit (Adobe Sign) form HTML Widget
'
' Copyright (C) Intersoft Systems Limited 2024
'
' Version: 1.00 (17/07/2024)
'
' Usage: System-supplied HTML Widget
' #################################################################
' Version        Date  User     Job       Description
' -------  ----------  -------  --------  -------------------------
'    1.00  11/06/2024  ISS      J033625   Created    
'          11/06/2024  ISS      J033649   Removed Duplicate Record Id, validating CostCentreId
'          17/07/2024  ISS      J033899   Showing/Hiding controls based on checkbox selection
' #################################################################

' Constants
Private Const FORM_KEY As String = "CostCentres"

' Objects
Private mCombinedParameters As ISKeyValueList
Private mParameters As ISKeyValueList
Private mStartupParameters As ISKeyValueList

' Standard Parameters
Private mCostCentreId As String
Private mPage As String
Private mReadOnly As Boolean

Public Function Main(eventId As String,
                     parametersJson As String,
                     startUpParametersJson As String,
                     hostingContext As isefinHtmlWidgetHostingContext,
                     requestInfo As finScriptRequestInfo,
                     ByRef returnValue As String) As Boolean

  ' Assume Success
  Main = True

  ' Get Parameters
  mParameters = finBL.CreateKeyValueList()
  mParameters.FromSimpleJsonString(parametersJson)
  mStartupParameters = finBL.CreateKeyValueList()
  mStartupParameters.FromSimpleJsonString(startUpParametersJson)

  ' Get Combined Parameters (Startup Parameters updated with event Parameters)
  mCombinedParameters = mStartupParameters.Clone()
  mCombinedParameters.UpdateFromKeyValueList(mParameters, True)

  ' Get Standard Parameters
  With mStartupParameters
    mCostCentreId = .GetString("CostCentreId") ' Always use Startup Parameters since the Cost Centre Id may be updated
    If Len(mCostCentreId) = 0 Then mCostCentreId = .GetString("Id")
  End With
  With mCombinedParameters
    mPage = .GetString("Page")
    mReadOnly = .GetBoolean("ReadOnly")
  End With

  ' Validate
  If Not finBL.HtmlWidgetUtilities.HasPermissionToViewFormKey(FORM_KEY) Then
    Main = False
  ElseIf Not finBL.CostCentreFunctions.IsServiceAvailable("AdobeSign")
    Main = False
    finBL.Error.ErrorBegin("This service is not available.")
  ElseIf Len(mCostCentreId) = 0 Then
    Main = False
    finBL.Error.ErrorBegin("Cost Centre Id not specified.")    
  End If

  ' Handle Events
  If Main Then
    Select Case eventId
      Case ""
        ' Main event, i.e., return initial HTML content (excluding html and body tags)
        returnValue = ScriptInfo.TemplateText

      Case "Finish"
        ' Finish wizard
        Main = Finish(parametersJson, requestInfo, returnValue)

     Case "GetInitialisationInfo"
        ' Get Initialisation Information required for this wizard
        Main = GetInitialisationInfo(returnValue)

      Case Else
        Main = False
        finBL.Error.ErrorBeginFormat("Unhandled event '{0}'", eventId)
    End Select
  End If

End Function

''' &lt;summary&gt;
'''  Load Cost Centre.
''' &lt;/summary&gt;
Private Function GetCostCentre(ByRef costCentre As finCostCentre) As Boolean

  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Validate

  ' Create and Load Cost Centre
  If Success Then
    ' Create Cost Centre
    costCentre = finBL.CreateCostCentre()

    ' Load Cost Centre
    Success = CostCentre.Load(mCostCentreId)
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Get Initialisation Information required for this wizard.
''' &lt;/summary&gt;
Public Function GetInitialisationInfo(ByRef response As String) As Boolean

  Dim CostCentre As finCostCentre
  Dim FormInitialisationInfo As FormInitialisationInfo
  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Validate

  ' Get Cost Centre
  If Success Then
    Success = GetCostCentre(CostCentre)
  End If

  ' Get Initialisation Info
  If Success Then
    FormInitialisationInfo = New FormInitialisationInfo()
    With FormInitialisationInfo
      ' Form
      .PageId = mPage
      If finBL.Database.IsReadOnly OrElse mReadOnly Then
        .ReadOnly = True
      Else
        .ReadOnly = False
      End If

      ' Record
      .CostCentreId = CostCentre.CostCentreId
      .Pk = CostCentre.Pk
      .Timestamp = CostCentre.Timestamp

      ' Page Permissions (defined here since they are used below)
      ' NOTE: Not applicable to this form

      ' Service
      .UseService = CostCentre.AdobeSign.UseService
      
      ' Credentials
      .ClientIdProduction = CostCentre.AdobeSign.CredentialsProduction.ClientId      
      .ClientSecretProduction = CostCentre.AdobeSign.CredentialsProduction.ClientSecret
      
      .AuthenticationUrlProduction = CostCentre.AdobeSign.CredentialsProduction.OAuthAuthenticationUrl
      .AuthenticationUrlProductionBlankTip = ISElectronicSignatureServiceAdobeSign.DefaultOAuthAuthenticationUrl      
      .RedirectUrlProduction = ISElectronicSignatureServiceAdobeSign.DefaultOAuthRedirectUrl
      .AuthenticationTokenProduction = CostCentre.AdobeSign.CredentialsProduction.OAuthRefreshToken      
      .ApiAccessPointProduction = CostCentre.AdobeSign.CredentialsProduction.APIAccessPoint    
      
      ' Test Credentials
      .ClientIdTest = CostCentre.AdobeSign.CredentialsTest.ClientId
      .ClientSecretTest = CostCentre.AdobeSign.CredentialsTest.ClientSecret      
      
      .AuthenticationUrlTest = CostCentre.AdobeSign.CredentialsTest.OAuthAuthenticationUrl
      .AuthenticationUrlTestBlankTip = ISElectronicSignatureServiceAdobeSign.DefaultOAuthAuthenticationUrl
      .RedirectUrlTest = ISElectronicSignatureServiceAdobeSign.DefaultOAuthRedirectUrl      
      .AuthenticationTokenTest = CostCentre.AdobeSign.CredentialsTest.OAuthRefreshToken            
      .ApiAccessPointTest = CostCentre.AdobeSign.CredentialsTest.APIAccessPoint
      
      ' Options
      .EnableElectronicSignature = CostCentre.AdobeSign.OptionsElectronicSignature.EnableElectronicSignature
      
      .CallbackUrl = CostCentre.AdobeSign.OptionsElectronicSignature.CallbackUrl
      .CallbackUrlBlankTip = finBL.ElectronicSignature.Service_AdobeSign.SuggestedCallbackUrl
      .DaysUntilSigningDeadline = CostCentre.AdobeSign.OptionsElectronicSignature.DaysUntilSigningDeadline
      .ReminderFrequency = CostCentre.AdobeSign.OptionsElectronicSignature.ReminderFrequencyText
      .SignatureFlow = CostCentre.AdobeSign.OptionsElectronicSignature.SignatureFlowText
      
      .IncludeAuditReport = CostCentre.AdobeSign.OptionsElectronicSignature.GetIncludeAuditReport    
      
      .NotifySigner = CostCentre.AdobeSign.OptionsElectronicSignature.CancelNotifySigner      

      ' Permissions

      ' Lists
      .ListAuthenticationUrlCsv = ISElectronicSignatureServiceAdobeSign.OAuthAuthenticationUrlListCsv
      .ListReminderFrequency = finBL.ElectronicSignature.Enums.iseElectronicSignatures_AdobeReminderFrequency_GetList()
      .ListSignatureFlow = finBL.ElectronicSignature.Enums.iseElectronicSignatures_AdobeSignatureFlow_GetList()
      
      ' Configuration
      .PromptOnSave = finBL.CloudConnectFunctions.CloudConnectSettings.PromptOnSave
    End With
  End If

  ' Response
  If Success Then
    Success = finBL.Runtime.WebUtilities.SerialiseObjectToJsonString(FormInitialisationInfo, response)
  End If

  Return Success

End Function

''' &lt;summary&gt;
'''  Finish, i.e., Save Cost Centre.
''' &lt;/summary&gt;
''' &lt;param name="parametersJson"&gt;
'''  A JSON formatted record (FormInitialisationInfo) object.
''' &lt;/param&gt;
Private Function Finish(parametersJson As String,
                        requestInfo As finScriptRequestInfo,
                        ByRef returnValue As String) As Boolean

  Dim CostCentre As finCostCentre
  Dim obj As Object
  Dim Record As FormInitialisationInfo
  Dim Success As Boolean

  ' Assume Success
  Success = True

  ' Parse Parameters
  If finBL.Runtime.WebUtilities.DeserialiseJsonStringToObject(parametersJson, GetType(FormInitialisationInfo), obj) Then
    Record = DirectCast(obj, FormInitialisationInfo)
  Else
    Success = False
  End If

  ' Get Cost Centre
  If Success Then
    Success = GetCostCentre(CostCentre)
  End If

  ' Validate
  If Success Then
    If Record.Timestamp &lt;&gt; CostCentre.Timestamp Then
      Success = False
      finBL.Error.ErrorBegin("This record has been updated by another User.")
    End If
  End If

  ' Update and Save
  If Success Then
    ' Begin Transaction
    If finBL.Database.TransactionBegin() Then
      ' Update Cost Centre
      With CostCentre.AdobeSign
        ' Service
        .UseService = Record.UseService
        
        ' Credentials
        With .CredentialsProduction
          .ClientId = Record.ClientIdProduction
          .ClientSecret = Record.ClientSecretProduction
          
          .OAuthAuthenticationUrl = Record.AuthenticationUrlProduction
          .OAuthRefreshToken = Record.AuthenticationTokenProduction
          .APIAccessPoint = Record.ApiAccessPointProduction
        End With
        
        ' Test Credentials
        With .CredentialsTest
          .ClientId = Record.ClientIdTest
          .ClientSecret = Record.ClientSecretTest
          
          .OAuthAuthenticationUrl = Record.AuthenticationUrlTest
          .OAuthRefreshToken = Record.AuthenticationTokenTest
          .APIAccessPoint = Record.ApiAccessPointTest
        End With
        
        ' Options
        With .OptionsElectronicSignature
          .EnableElectronicSignature = Record.EnableElectronicSignature
          
          .CallbackUrl = Record.CallbackUrl
          .DaysUntilSigningDeadline = Record.DaysUntilSigningDeadline
          .ReminderFrequencyText = Record.ReminderFrequency
          .SignatureFlowText = Record.SignatureFlow
          
          .GetIncludeAuditReport = Record.IncludeAuditReport
          
          .CancelNotifySigner = Record.NotifySigner
        End With
      End With

      ' Save
      If Success Then
        Success = CostCentre.Save()
      End If

      ' Commit/ Rollback Transaction
      If Success Then
        finBL.Database.TransactionCommit()
      Else
        finBL.Database.TransactionRollback()
      End If
    Else
      Success = False
    End If
  End If

  Return Success

End Function



''' &lt;summary&gt;
'''  Wizard Initialisation Information.
''' &lt;/summary&gt;
''' &lt;remarks&gt;
'''  This object is also used to save the Employment.
''' &lt;/remarks&gt;
Public Class FormInitialisationInfo

  ' Form
  Public PageId As String
  Public [ReadOnly] As Boolean

  ' Record
  Public CostCentreId As String
  Public Pk As Integer
  Public Timestamp As Integer

  ' Service
  Public UseService As Boolean
  
  ' Credentials
  Public ClientIdProduction As String
  Public ClientSecretProduction As String
  
  Public AuthenticationUrlProduction As String  
  Public AuthenticationUrlProductionBlankTip As String  
  Public RedirectUrlProduction As String
  Public AuthenticationTokenProduction As String  
  Public ApiAccessPointProduction As String  
  
  ' Test Credentials
  Public ClientIdTest As String
  Public ClientSecretTest As String
  
  Public AuthenticationUrlTest As String  
  Public AuthenticationUrlTestBlankTip As String
  Public RedirectUrlTest As String  
  Public AuthenticationTokenTest As String    
  Public ApiAccessPointTest As String
  
  ' Options
  Public EnableElectronicSignature As Boolean
  
  Public CallbackUrl As String  
  Public CallbackUrlBlankTip As String
  Public DaysUntilSigningDeadline As Integer  
  Public ReminderFrequency As String
  Public SignatureFlow As String
  
  Public IncludeAuditReport As Boolean  
  
  Public NotifySigner As Boolean

  ' Permissions

  ' Lists
  Public ListAuthenticationUrlCsv As String
  Public ListReminderFrequency As ISList
  Public ListSignatureFlow As ISList

  ' Configuration
  Public PromptOnSave As Boolean

End Class</Code>
    <Language>VisualBasic</Language>
    <Notes>System-supplied HTML Widget to edit the "Adobe Sign" page of a Cost Centre.</Notes>
    <PermissionKeyExecute />
    <ReferenceLinq>false</ReferenceLinq>
    <RunWithoutPrompts>false</RunWithoutPrompts>
    <TemplateText>&lt;div id="frmMain" class="is-widget-content" style="visibility:hidden"&gt;

  &lt;!-- Form Header --&gt;
  &lt;header&gt;
    &lt;!-- Tabs --&gt;
    &lt;div id="tabDetails" class="is-tabs"&gt;
      &lt;ul&gt;
        &lt;li tabId="Service"&gt;Service&lt;/li&gt;
        &lt;li tabId="Credentials"&gt;Credentials&lt;/li&gt;
        &lt;li tabId="TestCredentials"&gt;Test Credentials&lt;/li&gt;
        &lt;li tabId="Options"&gt;Options&lt;/li&gt;
      &lt;ul&gt;
    &lt;/div&gt;
  &lt;/header&gt;


  &lt;!-- Pages --&gt;
  &lt;div class="is-widget-form-body"&gt;
    &lt;!-- Service --&gt;
    &lt;div id="pageService"&gt;
      &lt;table class="is-form"&gt;
        &lt;colgroup&gt;
          &lt;col style="width:8em" /&gt;
          &lt;col /&gt;
        &lt;/colgroup&gt;

        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblService"&gt;Use the Adobe Sign Service?&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;input id="chkUseService" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;
    
    
  
    &lt;!-- Credentials --&gt;
    &lt;div id="pageCredentials"&gt;
      &lt;table class="is-form"&gt;
        &lt;colgroup&gt;
          &lt;col style="width:8em" /&gt;
          &lt;col /&gt;
        &lt;/colgroup&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblUserCredentialsProduction"&gt;Production User Credentials&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtClientIdProduction"&gt;Client ID:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtClientIdProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtClientSecretProduction"&gt;Client Secret:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtClientSecretProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblAuthenticationDetailsProduction"&gt;Production Authentication Details&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="cboAuthenticationUrlProduction"&gt;Authentication&amp;nbsp;URL:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboAuthenticationUrlProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtRedirectUrlProduction"&gt;Redirect URL:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtRedirectUrlProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtAuthenticationTokenProduction"&gt;Authentication&amp;nbsp;Token:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtAuthenticationTokenProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtApiAccessPointProduction"&gt;API&amp;nbsp;Access&amp;nbsp;Point:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtApiAccessPointProduction"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;



    &lt;!-- Test Credentials --&gt;
    &lt;div id="pageTestCredentials"&gt;
      &lt;table class="is-form"&gt;
        &lt;colgroup&gt;
          &lt;col style="width:8em" /&gt;
          &lt;col /&gt;
        &lt;/colgroup&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblUserCredentialsTest"&gt;Test User Credentials&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtClientIdTest"&gt;Client ID:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtClientIdTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtClientSecretTest"&gt;Client Secret:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtClientSecretTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblAuthenticationDetailsTest"&gt;Test Authentication Details&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="cboAuthenticationUrlTest"&gt;Authentication&amp;nbsp;URL:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboAuthenticationUrlTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtRedirectUrlTest"&gt;Redirect URL:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtRedirectUrlTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtAuthenticationTokenTest"&gt;Authentication&amp;nbsp;Token:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtAuthenticationTokenTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtApiAccessPointTest"&gt;API&amp;nbsp;Access&amp;nbsp;Point:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtApiAccessPointTest"/&gt;&lt;/td&gt;
        &lt;/tr&gt;     
      &lt;/table&gt;
    &lt;/div&gt;



    &lt;!-- Options --&gt;
    &lt;div id="pageOptions"&gt;
      &lt;table class="is-form"&gt;
        &lt;colgroup&gt;
          &lt;col style="width:8em" /&gt;
          &lt;col /&gt;
        &lt;/colgroup&gt;

        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblOptionsElectronicSignature"&gt;Electronic Signature Options&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;input id="chkEnableElectronicSignature" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblOptionsSending"&gt;Options (Sending)&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="txtCallbackUrl"&gt;Callback URL:&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="txtCallbackUrl"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="numSigningDeadline"&gt;Signing&amp;nbsp;Deadline&amp;nbsp;(days):&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="numSigningDeadline"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="cboReminderFrequency"&gt;Reminder&amp;nbsp;Frequency:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboReminderFrequency"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;label for="cboSignatureFlow"&gt;Signature&amp;nbsp;Flow:&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
          &lt;td&gt;&lt;input id="cboSignatureFlow"/&gt;&lt;/td&gt;
        &lt;/tr&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblOptionsGetDocuments"&gt;Options&amp;nbsp;(Get Documents)&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;input id="chkIncludeAuditReport" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
        
        &lt;tr&gt;
          &lt;th colspan="2"&gt;&lt;label id="lblOptionsCancelling"&gt;Options&amp;nbsp;(Cancelling)&amp;nbsp;&lt;/label&gt;&lt;/th&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;th&gt;&lt;input id="chkNotifySigners" type="checkbox"/&gt;&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/table&gt;
    &lt;/div&gt;

  &lt;/div&gt;


  &lt;!-- Form Footer --&gt;
  &lt;footer&gt;
    &lt;button id="cmdCancel" class="is-button"&gt;Cancel&lt;/button&gt;
    &lt;button id="cmdFinish" class="is-button ok"&gt;Save&lt;/button&gt;
  &lt;/footer&gt;

&lt;/div&gt;


&lt;script&gt;
// Properties
var mRecord;

var mOriginalJson;

// Controls
var C = {
  //   Service
  lblService: null,
  chkUseService: null,
  
  //   Credentials
  lblUserCredentialsProduction: null,
  txtClientIdProduction: null,
  txtClientSecretProduction: null,
  
  lblAuthenticationDetailsProduction: null,
  cboAuthenticationUrlProduction: null,
  txtRedirectUrlProduction: null,
  txtAuthenticationTokenProduction: null,
  txtApiAccessPointProduction: null,

  //   Test Credentials
  lblUserCredentialsTest: null,
  txtClientIdTest: null,
  txtClientSecretTest: null,
  
  lblAuthenticationDetailsTest: null,
  cboAuthenticationUrlTest: null,
  txtRedirectUrlTest: null,
  txtAuthenticationTokenTest: null,
  txtApiAccessPointTest: null,

  //   Options
  lblOptionsElectronicSignature: null,
  chkEnableElectronicSignature: null,
  
  lblOptionsSending: null,
  txtCallbackUrl: null,
  numSigningDeadline: null,
  cboReminderFrequency: null,
  cboSignatureFlow: null,
  
  lblOptionsGetDocuments: null,
  chkIncludeAuditReport: null,
  
  lblOptionsCancelling: null,
  chkNotifySigners: null,
}

// Form
var frmMain;
var tabDetails;

// Buttons
var cmdCancel;
var cmdFinish;

// Other

// ==========
// Initialise
// ==========
$(function () {
  // Mobile optimisations
  $(window).resize(Form_Resize);

  // --------
  // Controls
  // --------
  //   Service
  C.lblService = widget.UI.Label("lblService", {});
  C.chkUseService = widget.UI.CheckBox("chkUseService", {
    caption: "Use Service?",
    
    onChange: chkUseService_Change,
  });
  
  //   Credentials
  C.lblUserCredentialsProduction = widget.UI.Label("lblUserCredentialsProduction", {});
  C.txtClientIdProduction = widget.UI.TextBox("txtClientIdProduction", {
    maxLength: 100,
  });
  C.txtClientSecretProduction = widget.UI.TextBox("txtClientSecretProduction", {
    maxLength: 200,
    password: true,
    passwordRevealOnFocus: true,
  });
  
  C.lblAuthenticationDetailsProduction = widget.UI.Label("lblAuthenticationDetailsProduction", {
    tooltipHtml: "Access requires authorisation on behalf of your Adobe Sign Account.&lt;br/&gt;&lt;br/&gt;Select the correct shard (na1, na2, au1, eu1, in1, jp1 etc) that your Adobe Sign Account is configured under.",
  });
  C.cboAuthenticationUrlProduction = widget.UI.ComboBox("cboAuthenticationUrlProduction", {
    maxLength: 200,
  });
  // This is an internal URL and should always be read-only
  C.txtRedirectUrlProduction = widget.UI.TextBox("txtRedirectUrlProduction", {
    readOnly: true,
  });
  C.txtAuthenticationTokenProduction = widget.UI.TextBox("txtAuthenticationTokenProduction", {
    maxLength: 500,
    password: true,
    passwordRevealOnFocus: true,
  });
  C.txtApiAccessPointProduction = widget.UI.TextBox("txtApiAccessPointProduction", {
    maxLength: 200,
  });
  
  //   Test Credentials
  C.lblUserCredentialsTest = widget.UI.Label("lblUserCredentialsTest", {});
  C.txtClientIdTest = widget.UI.TextBox("txtClientIdTest", {
    maxLength: 100,
  });
  C.txtClientSecretTest = widget.UI.TextBox("txtClientSecretTest", {
    maxLength: 200,
    password: true,
    passwordRevealOnFocus: true,
  });
  
  C.lblAuthenticationDetailsTest = widget.UI.Label("lblAuthenticationDetailsTest", {
    tooltipHtml: "Access requires authorisation on behalf of your Adobe Sign Account.&lt;br/&gt;&lt;br/&gt;Select the correct shard (na1, na2, au1, eu1, in1, jp1 etc) that your Adobe Sign Account is configured under.",
  });
  C.cboAuthenticationUrlTest = widget.UI.ComboBox("cboAuthenticationUrlTest", {
    maxLength: 200,
  });
  // This is an internal URL and should always be read-only
  C.txtRedirectUrlTest = widget.UI.TextBox("txtRedirectUrlTest", {
    readOnly: true,
  });
  C.txtAuthenticationTokenTest = widget.UI.TextBox("txtAuthenticationTokenTest", {
    maxLength: 500,
    password: true,
    passwordRevealOnFocus: true,
  });
  C.txtApiAccessPointTest = widget.UI.TextBox("txtApiAccessPointTest", {
    maxLength: 200,
  });
  
  //   Options
  C.lblOptionsElectronicSignature = widget.UI.Label("lblOptionsElectronicSignature", {});
  C.chkEnableElectronicSignature = widget.UI.CheckBox("chkEnableElectronicSignature", {
    caption: "Enable Electronic Signature?",
    
    onChange: chkEnableElectronicSignature_Change
  });
  
  C.lblOptionsSending = widget.UI.Label("lblOptionsSending", {
    tooltipHtml: "The Callback URL for Adobe Sign to push status changes back to your system. This must be a publicly accessible URL.&lt;br/&gt;&lt;br/&gt;'Days Until Signing Dealine': Number of days Signers have before the Document expires."
  });
  C.txtCallbackUrl = widget.UI.TextBox("txtCallbackUrl", {
    maxLength: 200,
  });
  C.numSigningDeadline = widget.UI.NumberBox("numSigningDeadline", {
    decimals: 0,
    minValue: 0,
    maxValue: 999,
  });
  C.cboReminderFrequency = widget.UI.ComboBox("cboReminderFrequency", {
    limitToList: true,
    allowBlank: true,
  });
  C.cboSignatureFlow = widget.UI.ComboBox("cboSignatureFlow", {
    limitToList: true,
    allowBlank: true,
  });
  
  C.lblOptionsGetDocuments = widget.UI.Label("lblOptionsGetDocuments", {});
  C.chkIncludeAuditReport = widget.UI.CheckBox("chkIncludeAuditReport", {
    caption: "Include Audit Report?"
  });
  
  C.lblOptionsCancelling = widget.UI.Label("lblOptionsCancelling", {});
  C.chkNotifySigners = widget.UI.CheckBox("chkNotifySigners", {
    caption: "Notify Signers?"
  });
  // Grids

  // Create Widget form
  // NOTE: Hide by default for a cleaner startup
  frmMain = new widget.UI.Form("frmMain", { visible: false });

  // Create Tabs
  tabDetails = new widget.UI.Tabs("tabDetails", {
    style: "normal",
    onSelectedTabChanged: tabDetails_Refresh,
  });

  // Handle resize
  $(window).resize(Form_Resize);

  // Disable Close Button (this causes the 'FormClose' notification action to be invoked instead)
  widget.DisableCloseButton();
  widget.ActionNotificationHandle(Widget_NotificationHandler)

  // Handle Wizard Buttons
  cmdCancel = $("#cmdCancel");
  cmdFinish = $("#cmdFinish");
  cmdCancel.click(tabDetails_Cancel);
  cmdFinish.click(Form_ExecuteAction_Finish);

  // Reset
  Form_Reset();
});

// ==========
// Reset Form
// ==========
function Form_Reset() {
  // Resize
  Form_Resize();

  // Load Record (i.e., initialise wizard)
  Record_Load();
}

// ===========
// Load Record
// ===========
function Record_Load() {
  // Initialise
  mRecord = null;

  // Hide content
  frmMain.Visible(false);

  // Block UI
  widget.UI.Block("Initialising, please wait...");

  // Load Initialisation details
  widget.GetString("GetInitialisationInfo", {},
    // Success
    Record_Load_Done,

    // Fail
    function (message) {
      widget.UI.MsgBoxAlert("fail: " + message);
      Fields_Load();
    }
  );
}

function Record_Load_Done(data) {
  // Initialise
  mRecord = JSON.parse(data);

  // Set Tab
  if (mRecord &amp;&amp; mRecord.PageId) {
    tabDetails.SelectedTabId(mRecord.PageId);

    // Hide other Pages | NOT APPLICABLE FOR COST CENTER WIDGETS
//    if (mRecord.HideOtherPages) {
//      tabDetails.ShowSingleTab(mRecord.PageId);
//    }
  }
  else {
    tabDetails.SelectedTabId("Service");
  }

  // Page Permissions
  // NOTE: Not applicable to this form

  // Load Fields
  Fields_Load();

  // Save Fields (so UserData is in correct format for mOriginalJson)
  Fields_Save();

  // Save original JSON for Form_IsDirty
  mOriginalJson = JSON.stringify(mRecord);
}

// ===========
// Load Fields
// ===========
function Fields_Load() {
  if (mRecord) {
    // Service
    C.chkUseService.Value(mRecord.UseService);
    
    // Credentials
    C.txtClientIdProduction.Text(mRecord.ClientIdProduction);
    C.txtClientSecretProduction.Text(mRecord.ClientSecretProduction);
        
    C.cboAuthenticationUrlProduction.Text(mRecord.AuthenticationUrlProduction);
    C.txtRedirectUrlProduction.Text(mRecord.RedirectUrlProduction);    
    C.txtAuthenticationTokenProduction.Text(mRecord.AuthenticationTokenProduction);
    C.txtApiAccessPointProduction.Text(mRecord.ApiAccessPointProduction);    
    
    // Test Credentials
    C.txtClientIdTest.Text(mRecord.ClientIdTest);
    C.txtClientSecretTest.Text(mRecord.ClientSecretTest);    
    
    C.cboAuthenticationUrlTest.Text(mRecord.AuthenticationUrlTest);
    C.txtRedirectUrlTest.Text(mRecord.RedirectUrlTest);  
    C.txtAuthenticationTokenTest.Text(mRecord.AuthenticationTokenTest);
    C.txtApiAccessPointTest.Text(mRecord.ApiAccessPointTest);    
    
    // Options
    C.chkEnableElectronicSignature.Value(mRecord.EnableElectronicSignature);    
    
    C.txtCallbackUrl.Text(mRecord.CallbackUrl);    
    C.numSigningDeadline.Value(mRecord.DaysUntilSigningDeadline);
    C.cboReminderFrequency.Text(mRecord.ReminderFrequency);
    C.cboSignatureFlow.Text(mRecord.SignatureFlow);
        
    C.chkIncludeAuditReport.Value(mRecord.IncludeAuditReport); 
       
    C.chkNotifySigners.Value(mRecord.NotifySigner);    
  }

  // Unblock UI
  widget.UI.Unblock();

  // Update Controls

  // Update fields
  Fields_Update();

  // Refresh Tab
  tabDetails_Refresh();
  tabDetails_Resize();
}

// ===========
// Save Fields
// ===========
function Fields_Save() {
  // Service
  mRecord.UseService = C.chkUseService.Value();
    
  // Credentials
  mRecord.ClientIdProduction = C.txtClientIdProduction.Text();
  mRecord.ClientSecretProduction = C.txtClientSecretProduction.Text();  
  
  mRecord.AuthenticationUrlProduction = C.cboAuthenticationUrlProduction.Text();  
  mRecord.RedirectUrlProduction = C.txtRedirectUrlProduction.Text();  
  mRecord.AuthenticationTokenProduction = C.txtAuthenticationTokenProduction.Text();
  mRecord.ApiAccessPointProduction = C.txtApiAccessPointProduction.Text();  
  
  // Test Credentials
  mRecord.ClientIdTest = C.txtClientIdTest.Text();
  mRecord.ClientSecretTest = C.txtClientSecretTest.Text();  
  
  mRecord.AuthenticationUrlTest = C.cboAuthenticationUrlTest.Text();  
  mRecord.RedirectUrlTest = C.txtRedirectUrlTest.Text();  
  mRecord.AuthenticationTokenTest = C.txtAuthenticationTokenTest.Text();  
  mRecord.ApiAccessPointTest = C.txtApiAccessPointTest.Text();
  
  // Options
  mRecord.EnableElectronicSignature = C.chkEnableElectronicSignature.Value();
    
  mRecord.CallbackUrl = C.txtCallbackUrl.Text();
  mRecord.DaysUntilSigningDeadline = C.numSigningDeadline.Value();
  mRecord.ReminderFrequency = C.cboReminderFrequency.Text();
  mRecord.SignatureFlow = C.cboSignatureFlow.Text();
    
  mRecord.IncludeAuditReport = C.chkIncludeAuditReport.Value();
  
  mRecord.NotifySigner = C.chkNotifySigners.Value();
}

// =============
// Update Fields
// =============
function Fields_Update() {
  // Heading
  if (mRecord) {
    if (mRecord.CostCentreId) {
      widget.SetHeading("&lt;HTML&gt;&lt;b&gt;Adobe Sign:&lt;/b&gt; Cost Centre (" + mRecord.CostCentreId + ")");
    }
    else {
      widget.SetHeading("New Cost Centre");
    }
  }

  // Information Lists
  if (mRecord) {
  }

  // Lists
  if (mRecord) {
    C.cboAuthenticationUrlProduction.ListFromCsvString(mRecord.ListAuthenticationUrlCsv);
    C.cboAuthenticationUrlTest.ListFromCsvString(mRecord.ListAuthenticationUrlCsv);
    C.cboReminderFrequency.ListFromArray(mRecord.ListReminderFrequency);
    C.cboSignatureFlow.ListFromArray(mRecord.ListSignatureFlow);
  }

  // Controls
  if (mRecord) {
    // Production Credentials
    C.cboAuthenticationUrlProduction.BlankTip(mRecord.AuthenticationUrlProductionBlankTip);
    
    // Test Credentials
    C.cboAuthenticationUrlTest.BlankTip(mRecord.AuthenticationUrlTestBlankTip);
    
    // Options
    C.txtCallbackUrl.BlankTip(mRecord.CallbackUrlBlankTip);
    
    // Trigger change events
    chkUseService_Change();
    chkEnableElectronicSignature_Change();
  }

  // Pages
  if (mRecord) {
  }

  // Read-Only?
  if (mRecord &amp;&amp; mRecord.ReadOnly) {
    cmdFinish.prop("disabled", true);
    frmMain.FormReadOnly(C, true);
  }

  // Show content
  frmMain.Visible(mRecord != null);

  // Resize Tab
  tabDetails_Resize();
}

// ===========
// Resize Form
// ===========
function Form_Resize() {
  // Mobile Optimisations
  var el = $(".mobile-indent th.indent1, .mobile-indent th.no-indent1");
  if (window.innerWidth &lt; 500) {
    el.addClass("no-indent1").removeClass("indent1");
  }
  else {
    el.addClass("indent1").removeClass("no-indent1");
  }

  // General

  // Tab
  tabDetails_Resize();
}

// ========
// Is Dirty
// ========
function Form_IsDirty() {
  if (mRecord) {
    // Save Fields
    Fields_Save();

    // Is Dirty?
    return mOriginalJson != JSON.stringify(mRecord);
  }
  else {
    return false;
  }
}

// ==============
// Wizard Buttons
// ==============
function tabDetails_Cancel() {
  if (Form_IsDirty()) {
    // Confirm
    widget.UI.MsgBoxConfirm("Are you sure you want to close this form without saving your changes?", { heading: "Close Form" }, tabDetails_Cancel_Finalise);
  }
  else {
    // Cancel immediately
    tabDetails_Cancel_Finalise();
  }
}

function tabDetails_Cancel_Finalise() {
  if (widget.CanClose()) {
    widget.Close();
  }
  else {
    widget.Reset();
  }
}

// ==========
// Resize Tab
// ==========
function tabDetails_Resize() {
  switch (tabDetails.SelectedTabId()) {
    case "Credentials":
      // Credentials
      C.txtClientIdProduction.WidthResizeFromParent();
      C.txtClientSecretProduction.WidthResizeFromParent();
      
      C.cboAuthenticationUrlProduction.WidthResizeFromParent();
      C.txtRedirectUrlProduction.WidthResizeFromParent();
      C.txtAuthenticationTokenProduction.WidthResizeFromParent();
      C.txtApiAccessPointProduction.WidthResizeFromParent();
      break;
      
    case "TestCredentials":
      // Test Credentials
      C.txtClientIdTest.WidthResizeFromParent();
      C.txtClientSecretTest.WidthResizeFromParent();
      
      C.cboAuthenticationUrlTest.WidthResizeFromParent();
      C.txtRedirectUrlTest.WidthResizeFromParent();
      C.txtAuthenticationTokenTest.WidthResizeFromParent();
      C.txtApiAccessPointTest.WidthResizeFromParent();
      break;

    case "Options":
      C.txtCallbackUrl.WidthResizeFromParent();
      C.numSigningDeadline.WidthResizeFromParent();
      C.cboReminderFrequency.WidthResizeFromParent();
      C.cboSignatureFlow.WidthResizeFromParent();
      break;
  }
}

// ===========
// Refresh Tab
// ===========
function tabDetails_Refresh() {
   // Load details
  switch (tabDetails.SelectedTabId()) {
    default:
      break;
  }

  // Resize
  tabDetails_Resize();

  // Focus
  switch (tabDetails.SelectedTabId()) {
    default:
      tabDetails.FocusFirst();
      break;
  }
}

// =================
// Execute an Action
// =================
function Form_ExecuteAction(actionId, data) {
  switch(actionId) {
    default:
      window.alert("Unhandled action '" + actionId + "'");
  }
}

// =============
// Finish Action
// =============
function Form_ExecuteAction_Finish() {
  // Assume Success
  var Ok = true;

  // Validate
  Ok = tabDetails.Validate();

  // Prompt
  if (Ok) {
    if (mRecord.PromptOnSave) {
      // Confirm
      widget.UI.MsgBoxConfirm("Are you sure you want to save this record?",
                              { heading: "Save" },
                              Form_ExecuteAction_FinishPost);

    }
    else {
      // Save without prompting
      Form_ExecuteAction_FinishPost();
    }
  }
}

function Form_ExecuteAction_FinishPost() {
  // Disable Form
  widget.UI.Block("Saving, please wait...");

  // Create Parameters
  // NOTE: We will simply update mRecord, clone this and send back (less some information)
  Fields_Save();
  var params = mRecord;
  params.ListReminderFrequency = null;
  params.ListSignatureFlow = null;

  params = JSON.parse(JSON.stringify(params));
  
  // Finish
  widget.GetString("Finish", params,
    function (data) {
      // Close Form
      widget.Close();

      // Refresh Parent (to show updated details)
      // NOTE: Pass in Record Id just in case this has changed
      widget.RefreshParent(mRecord.CostCentreId);
    },

    function (data) {
      // Show Error
      widget.UI.MsgBoxAlert(data);

      // Enable Form
      widget.UI.Unblock();
    }
  );
}

// ====================
// Notification Handler
// ====================
function Widget_NotificationHandler(actionId, data) {
   switch(actionId) {
     case "FormClose":
      // Form Close button is disabled so act as if 'Cancel' has been clicked
      tabDetails_Cancel();
      break;
   }
}

// ==============
// Control Events
// ==============
function chkUseService_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;
  
  if (C.chkUseService.Value()) {
    // set all tabs to be visible
    tabDetails.ShowAllTabs();
  } else {
    // only show the Service tab
    tabDetails.ShowSingleTab("Service");
  }
}

function chkEnableElectronicSignature_Change(sender, e) {
  // Handled
  if (e) e.ChangeHandled = true;
  
  C.txtCallbackUrl.ReadOnly(! C.chkEnableElectronicSignature.Value());
  C.numSigningDeadline.ReadOnly(! C.chkEnableElectronicSignature.Value());
  C.cboReminderFrequency.ReadOnly(! C.chkEnableElectronicSignature.Value());
  C.cboSignatureFlow.ReadOnly(! C.chkEnableElectronicSignature.Value());
  C.chkIncludeAuditReport.ReadOnly(! C.chkEnableElectronicSignature.Value());
  C.chkNotifySigners.ReadOnly(! C.chkEnableElectronicSignature.Value());
}
&lt;/script&gt;</TemplateText>
    <TemplateTextBookmarks />
    <TimeoutSeconds>60</TimeoutSeconds>
    <UniqueId>3QUBbAcu5UmhjejK1UHYlg</UniqueId>
    <AllowRefresh>true</AllowRefresh>
    <Caption>Cost Centre</Caption>
    <HtmlWidgetAllowInitialEventCaching>false</HtmlWidgetAllowInitialEventCaching>
    <HtmlWidgetMaxHeight>800</HtmlWidgetMaxHeight>
    <HtmlWidgetMaxWidth>800</HtmlWidgetMaxWidth>
    <HtmlWidgetNeverApplyStyling>false</HtmlWidgetNeverApplyStyling>
    <HtmlWidgetResourceChartsApex>false</HtmlWidgetResourceChartsApex>
    <HtmlWidgetResourceCssSummaryPage2>false</HtmlWidgetResourceCssSummaryPage2>
    <HtmlWidgetResourceCssWidget>true</HtmlWidgetResourceCssWidget>
    <HtmlWidgetResourceJQuery>true</HtmlWidgetResourceJQuery>
    <HtmlWidgetResourceJQueryVersion />
    <HtmlWidgetSpecialEventGetFolderCount>false</HtmlWidgetSpecialEventGetFolderCount>
    <HtmlWidgetSpecialEventShowAsSummaryPage>false</HtmlWidgetSpecialEventShowAsSummaryPage>
    <HtmlWidgetSummaryPageObjectType>None</HtmlWidgetSummaryPageObjectType>
    <Icon>CostCentre</Icon>
    <RestrictedOriginsListEnabled>false</RestrictedOriginsListEnabled>
    <RunAsAdministrator>false</RunAsAdministrator>
    <WebServiceName />
    <WebServiceAllowAnonymous>false</WebServiceAllowAnonymous>
    <WebServiceSendDebugInformation>false</WebServiceSendDebugInformation>
    <ShowInMenu>None</ShowInMenu>
    <ParametersType>Custom</ParametersType>
    <Parameters>
      <ISParameterDefs version="1.00">
        <Parameters>
          <Parameter name="" type="SectionStart">
            <BlankTip />
            <Caption>Form options.</Caption>
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <SectionColumns>1</SectionColumns>
            <Visible>true</Visible>
          </Parameter>
          <Parameter name="" type="SectionStart">
            <BlankTip />
            <Caption>Configuration options.</Caption>
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <SectionColumns>1</SectionColumns>
            <Visible>true</Visible>
          </Parameter>
          <Parameter name="" type="SectionStart">
            <BlankTip />
            <Caption>TESTING</Caption>
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <SectionColumns>1</SectionColumns>
            <Visible>true</Visible>
          </Parameter>
          <Parameter name="CostCentreId" type="Range">
            <BlankTip />
            <Caption />
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <DefaultValueExpression />
            <Enabled>true</Enabled>
            <HideDescription>false</HideDescription>
            <IndentLevel>0</IndentLevel>
            <Mandatory>false</Mandatory>
            <NonPersistable>false</NonPersistable>
            <ReadOnly>false</ReadOnly>
            <ReadOnly2>false</ReadOnly2>
            <Value />
            <Visible>true</Visible>
            <LimitToList>false</LimitToList>
            <MaxLength>10</MaxLength>
            <RangeSingle>true</RangeSingle>
            <RangeType>Standard</RangeType>
            <RangeLookupSource>CostCentres</RangeLookupSource>
            <RangeLookupSqlWhere />
          </Parameter>
          <Parameter name="Page" type="List">
            <BlankTip />
            <Caption />
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <DefaultValueExpression />
            <Enabled>true</Enabled>
            <HideDescription>false</HideDescription>
            <IndentLevel>0</IndentLevel>
            <Mandatory>false</Mandatory>
            <NonPersistable>false</NonPersistable>
            <ReadOnly>false</ReadOnly>
            <ReadOnly2>false</ReadOnly2>
            <Value />
            <Visible>true</Visible>
            <List>Service,Credentials,TestCredentials,Options</List>
            <LimitToList>false</LimitToList>
            <MaxLength>0</MaxLength>
            <Rows>1</Rows>
          </Parameter>
          <Parameter name="ReadOnly" type="Boolean">
            <BlankTip />
            <Caption />
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <DefaultValueExpression />
            <Enabled>true</Enabled>
            <HideDescription>false</HideDescription>
            <IndentLevel>0</IndentLevel>
            <NonPersistable>false</NonPersistable>
            <ReadOnly>false</ReadOnly>
            <ReadOnly2>false</ReadOnly2>
            <Value>False</Value>
            <Visible>true</Visible>
          </Parameter>
        </Parameters>
      </ISParameterDefs>
    </Parameters>
  </finScript>