Vulnerability in EPiServer.Forms
I'm trying to add a button onto the bottom left hand side onto a custom gadget I have developed, this is where the action buttons are placed.
It's using a dojo class to do ajax call an mvc controller that send back a partial view. I've been looking at adding it through the postCreate function, but that is not working.
I'm looking for a consistent look to other widgets in the content side bar.
link to image here
You need to implement the command pattern. Some information can be found here: http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-CMS/8/User-interface/Command-Pattern/Command-pattern/
Your widget then needs to create an instance of that command and implement the epi/shell/command/_WidgetCommandProviderMixin. If you add the command to the commands property of the provider during startup then it will automatically be discovered and added to the UI.
We have an example component on GitHub that you can get inspiration from: https://github.com/episerver/AddOn.Favorites/blob/master/ClientResources/addon/component/Favorites.js