-
Notifications
You must be signed in to change notification settings - Fork 112
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
support ticket features #4055
Comments
For more complex requirements, you can override the template used to render the support ticket form: support_ticket:
ui_template: "my_custom_template" The default location for the override is: And use the current implementation as a reference: |
@abujeda thanks. any idea how to include the default template (i am no erb expert). i only need to append some javascript to it, no other changes required |
You should be able to by adding a render partial to the custom template: # /etc/ood/config/apps/dashboard/views/support_ticket/my_custom_template.html.erb
<%= javascript_tag nonce: true do -%>
const my_custom_js_here = true
<% end %>
<%= render partial: 'support_ticket/email_service_template' %> Do let us know if this works for you as we haven't try this option before. |
@abujeda thanks |
@abujeda hmm, the partial render looks for file prefixed with |
Ahh yes. |
Try updating partial to file: # /etc/ood/config/apps/dashboard/views/support_ticket/my_custom_template.html.erb
<%= javascript_tag nonce: true do -%>
const my_custom_js_here = true
<% end %>
<%= render file: 'support_ticket/email_service_template' %> |
|
i symlinked the |
Sorry for the back and forth, I should have tried myself before making the comment. <%= javascript_tag nonce: true do -%>
const my_custom_js_here = true
<% end %>
<%= render template: 'support_ticket/email_service_template' %> |
@abujeda awesome. thanks for helping out |
@abujeda i added supporting html tags in the description. maybe you know some other magic to achieve the same without having to touch the original email_service_template ;) |
You can redefine any partial following these instructions. This new file you provide in https://osc.github.io/ood-documentation/latest/customizations.html?#overriding-pages |
@johrstrom yes, @abujeda mentioned how to do this. but i only want to add some javascript like the apps forms do, not sure that is so unique to my case (and the description not being considered html safe is probably a bug anyway). anyway, i'll manage. thanks again for all the work that went into it |
some short update on this: i managed to do what i want using monkey patching some modules and classes. that way i have minimal issues with the upstream code. i let you decide if you want to add this as features or not. for me, this can be closed |
Would it be possible for you to share the monkey patching that you have implemented? |
@abujeda it's to implement some specific things, like a html description. i also made 3 categories in the support form, to require/hide certain data when filing a ticket. also to send html mails to support (with additional metadata generated so support doesn't have to look it up, incl links to certain tools we have; hence the need for html mail). the monkey patches are applied via the initialisers, and looks like
|
i forgot about another one, that might be useful: it's for server side jobid validation (so people can/must fill in a corectjob). the jobinfo gathered is basically
|
Thanks for sharing!! I will take a look and create an issue in my backlog to add some improvements to the support ticket feature. |
Sorry for the late reply, but I'm not 100% we don't already support this out of the box? https://osc.github.io/ood-documentation/latest/customizations.html#id22 and https://osc.github.io/ood-documentation/latest/customizations.html#overriding-pages
This is already supported.
Copy the partial and add a
You should be able to set https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/maxlength
Again, overriding the partial should allow you to do anything you like here. |
I am trying out the ticket support and have some feature requests:
.html_safe
(like<%= support_ticket_description_text.html_safe %>
)Anyway, i am probably discovering this pretty late, but this could be a great addition to our site. Nice work!
The text was updated successfully, but these errors were encountered: