How to use AUI in a Jira plugin?

I’m following the tutorial at https://developer.atlassian.com/server/framework/atlassian-sdk/creating-an-admin-configuration-form/ and the link on that page to https://studio.atlassian.com/browse/AJS seems to be dead.

What I’m trying to do is to use elements from https://docs.atlassian.com/aui/9.0.2/docs/toggle-button.html but when I add the in the velocity template it just remains as it is in the HTML source.
So it doesn’t “compile/enhance” to look and work as intended?

@DanielAnechitoaie did you required com.atlassian.auiplugin:aui-toggle webresource?
You can do it for example adding $webResourceManager.requireResource(“com.atlassian.auiplugin:aui-toggle”) at the top of your velocity template.

1 Like

I did not. Adding it fixed the issue and now it works. Thank you.
But now, a follow up question.
How does one know this? what resources are available to be used and their names so that we can requires them. Say I want to use some other widget from AUI. Is this process documented somewhere so that I know that I would need to include com.atlassian.auiplugin:aui-something-else?

Thank you again for the answer regarding the toggle component.

You can find the web resource key of a given AUI component in its documentation:

Cheers,
Sven

2 Likes