Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add the default form for support tickets #897

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions source/customizations/support-ticket.inc
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,50 @@ Custom fields can be added, but they will require a custom email template to mak
Override the default email template with your own by dropping a file named ``_email.text.erb`` into the folder
``/etc/ood/config/apps/dashboard/views/support_ticket/email/``

This is the default form for submitting support tickets. You can use this YAML as a starting
place for removing and/or adding fields.

.. code-block:: yaml

support_ticket:
email: must supplied by you

attributes:
username:
value: "<%= CurrentUser.name %>"
readonly: true
email:
widget: email_field
required: true
cc:
widget: email_field
subject:
required: true
session_id:
widget: hidden_field
session_description:
hide_when_empty: true
disabled: true
attachments:
widget: file_attachments
description:
widget: text_area
required: true
rows: 10
queue:
widget: hidden_field

form:
- username
- email
- cc
- subject
- session_id
- session_description
- attachments
- description
- queue

The example below shows a custom form configuration with 3 fields and how to use them in the template to generate the email body.

.. code-block:: yaml
Expand Down