source: trunk/grails-app/views/user/edit.gsp @ 1159

Last change on this file since 1159 was 1159, checked in by robert@…, 12 years ago

Improved the template editor so that template fields can be removed from templates, even if the templates are in use, but only if the template fields are never filled. (see ticket #74)

Also changed the user registration so that the administrator confirmation mails will be sent to the administrators in production environment, but still to gscfproject@… in other environments.

File size: 2.7 KB
Line 
1<head>
2        <meta name='layout' content='main'/>
3        <g:set var="entityName" value="${message(code: 'user.label', default: 'User')}"/>
4        <title><g:message code="default.edit.label" args="[entityName]"/></title>
5
6    <script type="text/javascript">
7      // This method is called on the event body.onLoad
8      $(function() {
9              $("#tabs").tabs();
10      });
11    </script>
12        <style type="text/css">
13          div.usermanagement { font-size: 0.8em; }
14        </style>
15</head>
16
17<body>
18    <script src="${resource(dir: 'js', file: 'jquery-callback-1.2.js')}" type="text/javascript"></script>
19
20        <g:if test="${flash.userError}">
21          <div id="error" class="error" title="errors">
22                        <p>
23                          ${flash.userError}
24                        </p>
25          </div>
26        </g:if>
27        <h3><g:message code="default.edit.label" args="[entityName]"/></h3>
28
29<g:form action="update" name='userEditForm' class="button-style">
30<g:hiddenField name="id" value="${user?.id}"/>
31<g:hiddenField name="version" value="${user?.version}"/>
32
33      <div id="tabs" class="usermanagement">
34        <ul>
35          <li><a href="#userinfo">User info</a></li>
36          <li><a href="#roles">Roles</a></li>
37        </ul>
38
39        <div id="userinfo">
40
41                  <table>
42                  <tbody>
43                        <tr><td>Username</td><td><g:textField name="username" value="${user?.username}"/></td></tr>
44                        <tr><td>Password</td><td><g:passwordField name="password" value="${user?.password}"/></td></tr>
45                        <tr><td>Email address</td><td><g:textField name="email" value="${user?.email}"/></td></tr>
46                        <tr><td>User confirmed</td><td><g:checkBox name="userConfirmed" value="${user?.userConfirmed}"/></td></tr>
47                        <tr><td>Admin confirmed</td><td><g:checkBox name="adminConfirmed" value="${user?.adminConfirmed}"/></td></tr>
48                        <tr><td>Account expired</td><td><g:checkBox name="accountExpired" value="${user?.accountExpired}"/></td></tr>
49                        <tr><td>Account locked</td><td><g:checkBox name="accountLocked" value="${user?.accountLocked}"/></td></tr>
50                        <tr><td>Password expired</td><td><g:checkBox name="passwordExpired" value="${user?.passwordExpired}"/></td></tr>
51
52                  </tbody>
53                  </table>
54          </div>
55          <div id="roles">
56                <g:each var="entry" in="${roleMap}">
57                <div>
58                        <g:checkBox name="${entry.key.authority}" value="${entry.value}"/>
59                        ${entry.key.authority.encodeAsHTML()}
60                </div>
61                </g:each>
62          </div>
63
64          </div>
65
66<div style='float:left; margin-top: 10px;'>
67  <input type="submit" value="Save" />
68
69  <g:if test='${user}'>
70    <input type="button" value="Delete" onClick="$('#userDeleteForm').submit(); return false;"/>
71  </g:if>
72
73</div>
74
75</g:form>
76
77<g:if test='${user}'>
78  <g:form action="delete" name='userDeleteForm'>
79        <g:hiddenField name="id" value="${user?.id}"/>
80  </g:form>
81</g:if>
82
83<script>
84$(document).ready(function() {
85        $('#username').focus();
86});
87</script>
88
89</body>
Note: See TracBrowser for help on using the repository browser.