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 | <link rel="stylesheet" href="${resource(dir: 'css', file: 'tipTip.css')}"/> |
---|
6 | <script type="text/javascript" src="${resource(dir: 'js', file: 'jquery.tipTip.minified.js')}"></script> |
---|
7 | <script type="text/javascript"> |
---|
8 | $(document).ready(function() { |
---|
9 | $(".tooltip").tipTip(); |
---|
10 | $("#tabs").tabs(); |
---|
11 | }); |
---|
12 | </script> |
---|
13 | <style type="text/css"> |
---|
14 | div.usermanagement { |
---|
15 | font-size: 0.8em; |
---|
16 | } |
---|
17 | </style> |
---|
18 | </head> |
---|
19 | |
---|
20 | <body> |
---|
21 | <script src="${resource(dir: 'js', file: 'jquery-callback-1.2.js')}" type="text/javascript"></script> |
---|
22 | |
---|
23 | <g:if test="${flash.userError}"> |
---|
24 | <div id="error" class="error" title="errors"> |
---|
25 | <p> |
---|
26 | ${flash.userError} |
---|
27 | </p> |
---|
28 | </div> |
---|
29 | </g:if> |
---|
30 | <h3><g:message code="default.edit.label" args="[entityName]"/></h3> |
---|
31 | |
---|
32 | <g:form action="update" name='userEditForm' class="button-style"> |
---|
33 | <g:hiddenField name="id" value="${user?.id}"/> |
---|
34 | <g:hiddenField name="version" value="${user?.version}"/> |
---|
35 | |
---|
36 | <div id="tabs" class="usermanagement"> |
---|
37 | <ul> |
---|
38 | <li><a href="#userinfo">User info</a></li> |
---|
39 | <li><a href="#roles">Roles</a></li> |
---|
40 | </ul> |
---|
41 | |
---|
42 | <div id="userinfo"> |
---|
43 | |
---|
44 | <table> |
---|
45 | <tbody> |
---|
46 | <g:if test="${user.shibbolethUser}"> |
---|
47 | <tr><td>Shibboleth user</td><td>yes</td></tr> |
---|
48 | <tr> |
---|
49 | <td>API key</td> |
---|
50 | <td valign="top" class="value"> |
---|
51 | <g:textField disabled="disabled" name="secret" value="${user.apiKey}" style="width:250px" /> |
---|
52 | <img src="${fam.icon(name: 'help')}" class="tooltip" title="in order to programmatically interface with gscf, a user needs his api key to communicate with the api. Refer to the api documentation at ${createLink(controller:'api')} for more information about how to use the api and the api key." /> |
---|
53 | </td> |
---|
54 | </tr> |
---|
55 | <tr><td>Username/Urn</td><td>${user?.username}</td></tr> |
---|
56 | <tr><td>Uid</td><td>${user?.uid}</td></tr> |
---|
57 | <tr><td>Email address</td><td><g:textField name="email" value="${user?.email}"/></td></tr> |
---|
58 | <tr><td>Organization</td><td>${user?.organization}</td></tr> |
---|
59 | <tr><td>VO Name</td><td>${user?.voName}</td></tr> |
---|
60 | <tr><td>User Status</td><td>${user?.userStatus}</td></tr> |
---|
61 | </g:if> |
---|
62 | <g:else> |
---|
63 | <tr><td>Shibboleth user</td><td>no</td></tr> |
---|
64 | <tr> |
---|
65 | <td>API key</td> |
---|
66 | <td valign="top" class="value"> |
---|
67 | <g:textField disabled="disabled" name="secret" value="${user.apiKey}" style="width:250px" /> |
---|
68 | <img src="${fam.icon(name: 'help')}" class="tooltip" title="in order to programmatically interface with gscf, a user needs his api key to communicate with the api. Refer to the api documentation at ${createLink(controller:'api')} for more information about how to use the api and the api key." /> |
---|
69 | </td> |
---|
70 | </tr> |
---|
71 | <tr><td>Username</td><td><g:textField name="username" value="${user?.username}"/></td></tr> |
---|
72 | <tr><td>Password</td><td><g:passwordField name="password" value="${user?.password}"/></td></tr> |
---|
73 | <tr><td>Email address</td><td><g:textField name="email" value="${user?.email}"/></td></tr> |
---|
74 | <tr><td>User confirmed</td><td><g:checkBox name="userConfirmed" |
---|
75 | value="${user?.userConfirmed}"/></td></tr> |
---|
76 | <tr><td>Admin confirmed</td><td><g:checkBox name="adminConfirmed" |
---|
77 | value="${user?.adminConfirmed}"/></td></tr> |
---|
78 | <tr><td>Account expired</td><td><g:checkBox name="accountExpired" |
---|
79 | value="${user?.accountExpired}"/></td></tr> |
---|
80 | <tr><td>Password expired</td><td><g:checkBox name="passwordExpired" |
---|
81 | value="${user?.passwordExpired}"/></td></tr> |
---|
82 | </g:else> |
---|
83 | <g:if test="${user != session.gscfUser}"> |
---|
84 | <tr><td>Account locked</td><td><g:checkBox name="accountLocked" |
---|
85 | value="${user?.accountLocked}"/></td></tr> |
---|
86 | </g:if> |
---|
87 | </tbody> |
---|
88 | </table> |
---|
89 | </div> |
---|
90 | |
---|
91 | <div id="roles"> |
---|
92 | <g:each var="entry" in="${roleMap}"> |
---|
93 | <div> |
---|
94 | <g:checkBox name="${entry.key.authority}" value="${entry.value}"/> |
---|
95 | ${entry.key.authority.encodeAsHTML()} |
---|
96 | </div> |
---|
97 | </g:each> |
---|
98 | </div> |
---|
99 | |
---|
100 | </div> |
---|
101 | |
---|
102 | <div style='float:left; margin-top: 10px;'> |
---|
103 | <input type="submit" value="Save"/> |
---|
104 | |
---|
105 | <g:if test='${user}'> |
---|
106 | <input type="button" value="Delete" onClick="$('#userDeleteForm').submit(); |
---|
107 | return false;"/> |
---|
108 | </g:if> |
---|
109 | |
---|
110 | </div> |
---|
111 | |
---|
112 | </g:form> |
---|
113 | |
---|
114 | <g:if test='${user}'> |
---|
115 | <g:form action="delete" name='userDeleteForm'> |
---|
116 | <g:hiddenField name="id" value="${user?.id}"/> |
---|
117 | </g:form> |
---|
118 | </g:if> |
---|
119 | |
---|
120 | <script> |
---|
121 | $(document).ready(function() { |
---|
122 | $('#username').focus(); |
---|
123 | }); |
---|
124 | </script> |
---|
125 | |
---|
126 | </body> |
---|