create.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:5k
源码类别:

PlugIns编程

开发平台:

Java

  1.   
  2. <html>
  3.   <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5.     <meta name="layout" content="main" />
  6.     <title><g:message code="user.create" default="Create Person" /></title>         
  7.   </head>
  8.   <body>
  9.     <div class="nav">
  10.       <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  11.       <span class="menuButton"><g:link class="list" action="list"><g:message code="user.list" default="User List" /></g:link></span>
  12.     </div>
  13.     <div class="body">
  14.       <h1><g:message code="user.create" default="Create Person" /></h1>
  15.       <g:if test="${flash.message}">
  16.         <div class="message">${flash.message}</div>
  17.       </g:if>
  18.       <g:hasErrors bean="${person}">
  19.         <div class="errors">
  20.           <g:renderErrors bean="${person}" as="list" />
  21.         </div>
  22.       </g:hasErrors>
  23.       <g:form action="save" method="post" >
  24.         <div class="dialog">
  25.           <table>
  26.             <tbody>
  27.               <tr class='prop'>
  28.                 <td valign='top' class='name'>
  29.                   <label for='username'><g:message code="user.loginName" default="Login Name:" /></label>
  30.                 </td>
  31.                 <td valign='top' 
  32.                  class='value ${hasErrors(bean:person,field:'username','errors')}'>
  33.                   <input type="text" name='username' 
  34.                     value="${person?.username?.encodeAsHTML()}"/>
  35.                 </td>
  36.               </tr>
  37.                        
  38.               <tr class='prop'>
  39.                 <td valign='top' class='name'>
  40.                   <label for='userRealName'><g:message code="user.fullName" default="Full Name:" /></label>
  41.                 </td>
  42.                 <td valign='top' 
  43.                     class='value ${hasErrors(bean:person,field:'userRealName','errors')}'>
  44.                   <input type="text" name='userRealName' 
  45.                     value="${person?.userRealName?.encodeAsHTML()}"/>
  46.                 </td>
  47.               </tr>
  48.                        
  49.               <tr class='prop'>
  50.                 <td valign='top' class='name'>
  51.                   <label for='passwd'><g:message code="user.password" default="Password:" /></label>
  52.                 </td>
  53.                 <td valign='top' 
  54.                     class='value ${hasErrors(bean:person,field:'passwd','errors')}'>
  55.                   <input type="password" name='passwd' 
  56.                          value="${person?.passwd?.encodeAsHTML()}"/>
  57.                 </td>
  58.               </tr>
  59.                        
  60.               <tr class='prop'>
  61.                 <td valign='top' class='name'>
  62.                   <label for='enabled'><g:message code="user.enabled" default="Enabled:" /></label>
  63.                 </td>
  64.                 <td valign='top' 
  65.                  class='value ${hasErrors(bean:person,field:'enabled','errors')}'>
  66.                   <g:checkBox name='enabled' value="${person?.enabled}" ></g:checkBox>
  67.                 </td>
  68.               </tr>
  69.                        
  70.               <tr class='prop'>
  71.                 <td valign='top' class='name'>
  72.                   <label for='description'><g:message code="user.description" default="Description:" /></label>
  73.                 </td>
  74.                 <td valign='top' 
  75.                     class='value ${hasErrors(bean:person,field:'description','errors')}'>
  76.                   <input type="text" name='description' 
  77.                          value="${person?.description?.encodeAsHTML()}"/>
  78.                 </td>
  79.               </tr>
  80.                        
  81.               <tr class='prop'>
  82.                 <td valign='top' class='name'>
  83.                   <label for='email'><g:message code="user.email" default="Email:" /></label>
  84.                 </td>
  85.                 <td valign='top' 
  86.                     class='value ${hasErrors(bean:person,field:'email','errors')}'>
  87.                   <input type="text" name='email' 
  88.                          value="${person?.email?.encodeAsHTML()}"/>
  89.                 </td>
  90.               </tr>
  91.                        
  92.               <tr class='prop'>
  93.                 <td valign='top' class='name'>
  94.                   <label for='email_show'><g:message code="user.showEmail" default="Show Email:" /></label>
  95.                 </td>
  96.                 <td valign='top' 
  97.                     class='value ${hasErrors(bean:person,field:'email_show','errors')}'>
  98.                   <g:checkBox name='email_show' value="${person?.email_show}" >
  99.                   </g:checkBox>
  100.                 </td>
  101.               </tr>
  102.                         
  103.               <tr class='prop'>
  104.                 <td valign='top' class='name' align="left"><g:message code="user.assignRoles" default="Assign Roles:" /></td>
  105.               </tr>
  106.             
  107.               <g:each in="${authorityList}">
  108.        <tr>
  109.           <td valign='top' class='name' align="left">
  110.             ${it.authority?.substring(5)?.toLowerCase()?.encodeAsHTML()}
  111.           </td>
  112.           <td align="left">
  113.             <g:checkBox name='${it.authority}' value="${false}" ></g:checkBox>
  114.           </td>
  115.        </tr>
  116.           </g:each>
  117.     
  118.             </tbody>
  119.           </table>
  120.         </div>
  121.         
  122.         <div class="buttons">
  123.           <span class="formButton">
  124.             <span class="button"><input class="save" type="submit" value="${message(code:'create', 'default':'Create')}" /></span>
  125.           </span>
  126.         </div>
  127.             
  128.       </g:form>
  129.     </div>
  130.   </body>
  131. </html>