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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

86 views 0 5
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