Skip to content

Instantly share code, notes, and snippets.

@nullset2
Created July 27, 2017 06:20
Show Gist options
  • Save nullset2/76d5b8caf6a84602e6db90520e94a052 to your computer and use it in GitHub Desktop.
Save nullset2/76d5b8caf6a84602e6db90520e94a052 to your computer and use it in GitHub Desktop.
<%@ page import="blog.Post" %>
<%@ page import="blog.Tag" %>
<div class="fieldcontain ${hasErrors(bean: post, field: 'title', 'error')} ">
<label for="title">
<g:message code="post.title.label" default="Title" />
</label>
<g:textField name="title" value="${post.title}" />
</div>
<div class="fieldcontain ${hasErrors(bean: post, field: 'content', 'error')} ">
<label for="title">
<g:message code="post.content.label" default="Content" />
</label>
<g:textArea name="content" value="${post.content}" rows="30" cols="160" class="big-textarea"/>
</div>
<div class="fieldcontain">
<g:each in="${Tag.list()}" var="tag">
<label>${tag.name}</label><g:checkBox name="tags" value="${tag.id}" checked="${post.tags.find { it.id == tag.id }}" />
</g:each>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment