PageRenderTime 70ms CodeModel.GetById 40ms app.highlight 1ms RepoModel.GetById 19ms app.codeStats 0ms

/grails-app/views/usuario/_form.gsp

http://github.com/jdmr/mateo
text | 89 lines | 73 code | 16 blank | 0 comment | 0 complexity | bd2968b667f6b52e3881b270328bf801 MD5 | raw file
 1<%@ page import="general.Usuario" %>
 2
 3
 4
 5<div class="fieldcontain ${hasErrors(bean: usuario, field: 'username', 'error')} required">
 6	<label for="username">
 7		<g:message code="usuario.username.label" default="Username" />
 8		<span class="required-indicator">*</span>
 9	</label>
10	<g:textField name="username" required="" value="${usuario?.username}"/>
11</div>
12
13<div class="fieldcontain ${hasErrors(bean: usuario, field: 'password', 'error')} required">
14	<label for="password">
15		<g:message code="usuario.password.label" default="Password" />
16		<span class="required-indicator">*</span>
17	</label>
18	<g:passwordField name="password" required="" value="${usuario?.password}"/>
19</div>
20
21<div class="fieldcontain ${hasErrors(bean: usuario, field: 'nombre', 'error')} required">
22	<label for="nombre">
23		<g:message code="usuario.nombre.label" default="Nombre" />
24		<span class="required-indicator">*</span>
25	</label>
26	<g:textField name="nombre" maxlength="64" required="" value="${usuario?.nombre}"/>
27</div>
28
29<div class="fieldcontain ${hasErrors(bean: usuario, field: 'apellido', 'error')} required">
30	<label for="apellido">
31		<g:message code="usuario.apellido.label" default="Apellido" />
32		<span class="required-indicator">*</span>
33	</label>
34	<g:textField name="apellido" maxlength="128" required="" value="${usuario?.apellido}"/>
35</div>
36
37<div class="fieldcontain ${hasErrors(bean: usuario, field: 'correo', 'error')} required">
38	<label for="correo">
39		<g:message code="usuario.correo.label" default="Correo" />
40		<span class="required-indicator">*</span>
41	</label>
42    <input type="email" name="correo" maxlength="128" required="" value="${usuario?.correo}" id="correo" />
43</div>
44
45<div class="fieldcontain ${hasErrors(bean: usuario, field: 'accountExpired', 'error')} ">
46	<label for="accountExpired">
47		<g:message code="usuario.accountExpired.label" default="Account Expired" />
48		
49	</label>
50	<g:checkBox name="accountExpired" value="${usuario?.accountExpired}" />
51</div>
52
53<div class="fieldcontain ${hasErrors(bean: usuario, field: 'accountLocked', 'error')} ">
54	<label for="accountLocked">
55		<g:message code="usuario.accountLocked.label" default="Account Locked" />
56		
57	</label>
58	<g:checkBox name="accountLocked" value="${usuario?.accountLocked}" />
59</div>
60
61<div class="fieldcontain ${hasErrors(bean: usuario, field: 'enabled', 'error')} ">
62	<label for="enabled">
63		<g:message code="usuario.enabled.label" default="Enabled" />
64		
65	</label>
66	<g:checkBox name="enabled" value="${usuario?.enabled}" />
67</div>
68
69<div class="fieldcontain ${hasErrors(bean: usuario, field: 'passwordExpired', 'error')} ">
70	<label for="passwordExpired">
71		<g:message code="usuario.passwordExpired.label" default="Password Expired" />
72		
73	</label>
74	<g:checkBox name="passwordExpired" value="${usuario?.passwordExpired}" />
75</div>
76
77<g:if test="${roles}">
78    <div class="fieldcontain ${hasErrors(bean: usuario, field: 'authorities', 'error')} ">
79        <g:set var="contador" value="${1}" />
80        <g:each var="entry" in="${roles}">
81            <label for="${entry.key.authority}">
82                <g:if test="${contador++ == 1}">
83                    <g:message code="usuario.authorities.label" default="Authorities" />
84                </g:if>
85            </label>
86            <g:checkBox name="${entry.key.authority}" value="${entry.value}"/> ${entry.key.authority}<br/>
87        </g:each>
88    </div>
89</g:if>