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()

See
  • GatheringWaiversController.attest() Server endpoint

Methods

clearMessages()

Clear all messages

connect()

Initialize Bootstrap modal instance

escapeHtml()

Escape HTML to prevent XSS

getCsrfToken()

Get CSRF token from meta tag

populateReasons()

Populate the reason selection radio buttons

resetSubmitButton()

Reset submit button to original state

showError()

Show error message

showModal()

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

showSuccess()

Show success message

(async) submitAttestation()

Submit the attestation form