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

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.       <g:javascript library="applicat" />
  7.     <title><g:message code="authority.edit" default="Edit Authority" /></title>
  8.   </head>
  9.   <body>
  10.     <div class="nav">
  11.       <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  12.       <span class="menuButton"><g:link class="list" action="list"><g:message code="authority.list" default="Authority List" /></g:link></span>
  13.       <span class="menuButton"><g:link class="create" action="create"><g:message code="authority.new" default="New Authority" /></g:link></span>
  14.     </div>
  15.     <div class="body">
  16.       <h1><g:message code="authority.edit" default="Edit Authority" /></h1>
  17.       <g:if test="${flash.message}">
  18.         <div class="message">${flash.message}</div>
  19.       </g:if>
  20.       <g:hasErrors bean="${authority}">
  21.         <div class="errors">
  22.           <g:renderErrors bean="${authority}" as="list" />
  23.         </div>
  24.       </g:hasErrors>
  25.       <div class="prop">
  26.         <span class="name">Id:</span>
  27.     <span class="value">${authority?.id}</span>
  28.       </div>           
  29.       <g:form controller="role" action="update"  method="post" >
  30.         <input type="hidden" name="id" value="${authority?.id}" />
  31.         <div class="dialog">
  32.           <table style="width:98%;background-color: #FFF;"  cellpadding="0" cellspacing="0">
  33.             <tbody>
  34.   <tr class='prop'>
  35.     <td valign='top' class='name'>
  36.      <label for='authority'><g:message code="role.name" />:</label>
  37.     </td>
  38. <td valign='top'
  39. class='value ${hasErrors(bean:authority,field:'authority','errors')}'>
  40.   <input type="text" name='authority'
  41.  value="${authority?.authority?.substring(5)?.toLowerCase()?.encodeAsHTML()}"/>
  42. </td>
  43.   </tr>
  44.               <tr class='prop'>
  45.                 <td valign='top' class='name'>
  46.                  <label for='description'><g:message code="role.description" />:</label>
  47.                 </td>
  48.                 <td valign='top'
  49.                     class='value ${hasErrors(bean:authority,field:'description','errors')}'>
  50.                   <input type="text" name='description'
  51.                          value="${authority?.description?.encodeAsHTML()}"/>
  52.                 </td>
  53.               </tr>
  54.   <tr class='prop'>
  55.     <td valign='top' class='name'>
  56.       <label for='people'><g:message code="role.people" />:</label>
  57.     </td>
  58. <td valign='top'
  59.     class='value ${hasErrors(bean:authority,field:'people','errors')}'>
  60.   <ul>
  61.          <g:each var='p' in='${authority?.people?}'>
  62.            <li>${p}</li>
  63.      </g:each>
  64.   </ul>
  65. </td>
  66.   </tr>
  67.                 <tr class='prop'>
  68.                <td valign='top' class='name'>
  69.                  <label for='powerLevel'><g:message code="role.powerLevel" />:</label>
  70.                </td>
  71.            <td valign='top'
  72.                class='value ${hasErrors(bean:authority,field:'powerLevel','errors')}'>
  73.                <g:select   id='powerLevel' name='powerLevel' optionKey="codValue2" optionValue="codName"  from="${Code.findAllByCkind(Ckind.findByCkiFlag('PowerLevel'))}" value="${fieldValue(bean:authority,field:'powerLevel')}" valueMessagePrefix="authority.powerLevel" ></g:select>
  74.            </td>
  75.              </tr>
  76.                   <tr class='prop'>
  77.     <td valign='top' class='name'><label for='url'><g:message code="role.url"/>:</label></td>
  78. <td valign='top' class='value ${hasErrors(bean:requestmap,field:'url','errors')}'>
  79.    <g:editAllAction allurl="${grailsApplication.controllerClasses}" checkedurl="${Requestmap.findAllByConfigAttributeLike('%' + authority.authority.toUpperCase() + ',%')}" ></g:editAllAction>
  80. </td>
  81.   </tr>
  82.             </tbody>
  83.           </table>
  84.         </div>
  85.         <div class="buttons">
  86.           <span class="button"><g:actionSubmit class="save" action="update" value="${message(code:'default.update')}"  /></span>
  87.           <span class="button"><input  class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'default.return', 'default':'Return')}"/> </span>
  88.         </div>
  89.       </g:form>
  90.     </div>
  91.   </body>
  92. </html>