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

PlugIns编程

开发平台:

Java

  1. <html>
  2.     <head>
  3.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  4.         <meta name="layout" content="main" />
  5.         <title><g:message code="code.edit" default="Edit Code" /></title>
  6.     </head>
  7.     <body>
  8.         <div class="nav">
  9.             <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  10.             <span class="menuButton"><g:link class="list" action="list"><g:message code="code.list" default="Code List" /></g:link></span>
  11.             <span class="menuButton"><g:link class="create" action="create"><g:message code="code.new" default="New Code" /></g:link></span>
  12.         </div>
  13.         <div class="body">
  14.             <h1><g:message code="code.edit" default="Edit Code" /></h1>
  15.             <g:if test="${flash.message}">
  16.             <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
  17.             </g:if>
  18.             <g:hasErrors bean="${code}">
  19.             <div class="errors">
  20.                 <g:renderErrors bean="${code}" as="list" />
  21.             </div>
  22.             </g:hasErrors>
  23.             <g:form method="post" >
  24.                 <input type="hidden" name="id" value="${code?.id}" />
  25.                 <div class="dialog">
  26.                     <table>
  27.                         <tbody>
  28.                         
  29.                             <tr class="prop">
  30.                                 <td valign="top" class="name">
  31.                                     <label for="codName"><g:message code="code.codName" default="Cod Name" />:</label>
  32.                                 </td>
  33.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'codName','errors')}">
  34.                                     <input type="text" maxlength="20" id="codName" name="codName" value="${fieldValue(bean:code,field:'codName')}"/>
  35.                                 </td>
  36.                             </tr> 
  37.                         
  38.                             <tr class="prop">
  39.                                 <td valign="top" class="name">
  40.                                     <label for="codValue1"><g:message code="code.codValue1" default="Cod Value1" />:</label>
  41.                                 </td>
  42.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'codValue1','errors')}">
  43.                                     <input type="text" maxlength="40" id="codValue1" name="codValue1" value="${fieldValue(bean:code,field:'codValue1')}"/>
  44.                                 </td>
  45.                             </tr> 
  46.                         
  47.                             <tr class="prop">
  48.                                 <td valign="top" class="name">
  49.                                     <label for="codValue2"><g:message code="code.codValue2" default="Cod Value2" />:</label>
  50.                                 </td>
  51.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'codValue2','errors')}">
  52.                                     <textarea rows="5" cols="40" name="codValue2">${code?.codValue2?.encodeAsHTML()}</textarea>
  53.                                 </td>
  54.                             </tr> 
  55.                         
  56.                             <tr class="prop">
  57.                                 <td valign="top" class="name">
  58.                                     <label for="codValue3"><g:message code="code.codValue3" default="Cod Value3" />:</label>
  59.                                 </td>
  60.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'codValue3','errors')}">
  61.                                     <input type="text" maxlength="40" id="codValue3" name="codValue3" value="${fieldValue(bean:code,field:'codValue3')}"/>
  62.                                 </td>
  63.                             </tr> 
  64.                         
  65.                             <tr class="prop">
  66.                                 <td valign="top" class="name">
  67.                                     <label for="codValue4"><g:message code="code.codValue4" default="Cod Value4" />:</label>
  68.                                 </td>
  69.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'codValue4','errors')}">
  70.                                     <input type="text" maxlength="40" id="codValue4" name="codValue4" value="${fieldValue(bean:code,field:'codValue4')}"/>
  71.                                 </td>
  72.                             </tr> 
  73.                         
  74.                             <tr class="prop">
  75.                                 <td valign="top" class="name">
  76.                                     <label for="ckind"><g:message code="code.ckind" default="Ckind" />:</label>
  77.                                 </td>
  78.                                 <td valign="top" class="value ${hasErrors(bean:code,field:'ckind','errors')}">
  79.                                     <g:select optionKey="id" from="${Ckind.list()}" name="ckind.id" value="${code?.ckind?.id}" ></g:select>
  80.                                 </td>
  81.                             </tr> 
  82.                         
  83.                         </tbody>
  84.                     </table>
  85.                 </div>
  86.                 <div class="buttons">
  87.                     <span class="button"><g:actionSubmit class="save" action="Update" value="${message(code:'update', 'default':'Update')}" /></span>
  88.                     <span class="button"><g:actionSubmit class="delete" onclick="return confirm('${message(code:'delete.confirm', 'default':'Are you sure?')}');" action="Delete" value="${message(code:'delete', 'default':'Delete')}" /></span>
  89.                 </div>
  90.             </g:form>
  91.         </div>
  92.     </body>
  93. </html>