Skip to content

Instantly share code, notes, and snippets.

@spaceCamel
Created January 13, 2011 11:08
Show Gist options
  • Save spaceCamel/777722 to your computer and use it in GitHub Desktop.
Save spaceCamel/777722 to your computer and use it in GitHub Desktop.
<html>
<body>
<!-- REPLACE THIS -->
<div class="buttons">
<g:form>
<g:hiddenField name="id" value="\${${propertyName}?.id}" />
<span class="button"><g:actionSubmit class="edit" action="edit" value="\${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
<span class="button"><g:actionSubmit class="delete" action="delete" value="\${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('\${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
</g:form>
</div>
<!-- WITH THIS -->
<div class="buttons">
<g:form action="edit" method="GET" id="\${${propertyName}?.id}">
<span class="button"><input type="submit" class="edit" value="\${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
</g:form>
<g:form>
<g:hiddenField name="id" value="\${${propertyName}?.id}" />
<span class="button"><g:actionSubmit class="delete" action="delete" value="\${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('\${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
</g:form>
</div>
<!-- AND ADD THIS -->
<style type="text/css">
div.buttons > form {
display:inline;
}
</style>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment