Created
September 27, 2013 14:43
-
-
Save dtanner/6729676 to your computer and use it in GitHub Desktop.
Allow class attribute on a custom Grails Fields template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ page defaultCodec="none" %> | |
<div class="form-group ${formGroupClass ?: ''} <g:if test="${invalid}">has-error</g:if>"> | |
<label class="control-label ${labelClass ?: ''}" for="${property}">${label} <%=required ? "*" : ""%></label> | |
<input type="<%=type ?: "text" %>" name="${prefix ?: ''}${property}" id="${prefix ?: ''}${property}" value="${value}" <%=constraints.maxSize ? "maxlength=${constraints.maxSize}" : ""%> <%=readonly ? "readonly=readonly" : ""%> class="form-control <%= pageScope["class"] ?: '' %>" <%=placeholder ? "placeholder='$placeholder'" : ""%>/> | |
<g:if test="${helpText}"><span class="help-block">${helpText}</span></g:if> | |
<g:if test="${invalid}"><span class="help-block">${errors.join('<br>')}</span></g:if> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<f:field bean="person" property="phone" class="phone"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment