WaiverAttestationController

WaiverAttestationController

Waiver Attestation Controller

Manages the modal for attesting that a waiver is not needed for a specific activity/waiver type combination. Handles:

  • Modal display with configurable reasons
  • Reason selection
  • Form submission via AJAX
  • Success/error feedback

Data Values:

  • activityId: Gathering activity ID
  • waiverTypeId: Waiver type ID
  • gatheringId: Gathering ID
  • reasons: JSON array of exemption reasons

Targets:

  • modal: The Bootstrap modal element
  • reasonList: Container for reason radio buttons
  • notes: Textarea for optional notes
  • submitBtn: Submit button
  • error: Error message container
  • success: Success message container

Actions:

  • showModal: Displays the modal with reasons
  • submitAttestation: Submits the attestation form

Constructor

new WaiverAttestationController()

Source:
See:
  • GatheringWaiversController.attest() Server endpoint

Methods

clearMessages()

Description:
  • Clear all messages

Source:

connect()

Description:
  • Initialize Bootstrap modal instance

Source:

escapeHtml()

Description:
  • Escape HTML to prevent XSS

Source:

getCsrfToken()

Description:
  • Get CSRF token from meta tag

Source:

populateReasons()

Description:
  • Populate the reason selection radio buttons

Source:

resetSubmitButton()

Description:
  • Reset submit button to original state

Source:

showError()

Description:
  • Show error message

Source:

showModal()

Description:
  • Show the modal and populate with reasons Called when user clicks "Attest Not Needed" button

Source:

showSuccess()

Description:
  • Show success message

Source:

(async) submitAttestation()

Description:
  • Submit the attestation form

Source: