How are the 'Save' and 'Cancel' buttons for the documentation theme configuration created?

I was browsing the source code and I can't seem to locate the code for creating the 'Save' and 'Cancel' buttons that appear in the page for configuring the theme (http://localhost:8090/admin/doctheme/configuretheme.action).

1 answer

Both configuration screens, the global one and the one for the spaces, use the same template: /doctheme/templates/configuretheme-common.vm

The code that is responsible for the "Save" and "Cancel" buttons should be this one:

#bodytag( "Submit" "theme='aui'" )
    #param ("submitValue" "$action.getText('save.name')")
#end

Hope this helps

That`s what I figured, but I don`t understand how both buttons are created with this code. From what I can tell this one only creates one of the buttons.

That only creates a button with the text 'Edit'. Also, I`m using Confluence 4.1.

By choosing the "theme='aui'" it uses a custom submit.vm which creates both buttons. You can find the custom submit.vm in the Confluence source code.

I already did that. I will just use "theme='notable'" and creat two separate buttons.

'aui' won`t even let me name the buttons. Must have something to do with the Confluence version I`m running because from what I know documentation theme isn`t supported by recent versions anymore.

Thank you!

Please take a look at the file submit.vm in the Confluence source code. It's all in there.

You probably need to set $editMode to true or add a parameter "editMode" which is "true".

#set($editMode = "true")

or

#bodytag( "Submit" "theme='aui'" )
    #param ("submitValue" "$action.getText('save.name')")
    #param ("editMode" "true")
#end

They also do this in the documentation theme plugin.

Strange, lots of our customers are using highly customized documentation themes with multiple different 4.x versions and until today, they all work like expected.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Jul 10, 2018 in Marketplace Apps

If you’re an Atlassian app developer, you’ll want to know about Atlas Camp!

This September 6-7, hundreds of Atlassian App developers will flock to Barcelona Spain to build skills, discover product roadmaps, meet face-to-face with the Atlassian team, and learn how to extend t...

159 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you