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

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="staff.edit" default="Edit Staff" /></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="staff.list" default="Staff List" /></g:link></span>
  11.             <span class="menuButton"><g:link class="create" action="create"><g:message code="staff.new" default="New Staff" /></g:link></span>
  12.         </div>
  13.         <div class="body">
  14.             <h1><g:message code="staff.edit" default="Edit Staff" /></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="${staff}">
  19.             <div class="errors">
  20.                 <g:renderErrors bean="${staff}" as="list" />
  21.             </div>
  22.             </g:hasErrors>
  23.             <g:form method="post"  enctype="multipart/form-data">
  24.                 <input type="hidden" name="id" value="${staff?.id}" />
  25.                 <div class="dialog">
  26.                     <table>
  27.                         <tbody>
  28.                         
  29.                             <tr class="prop">
  30.                                 <td valign="top" class="name">
  31.                                     <label for="person"><g:message code="staff.person" default="Person" />:</label>
  32.                                 </td>
  33.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'person','errors')}">
  34.                                     <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${staff?.person?.id}" noSelection="['null':'']"></g:select>
  35.                                 </td>
  36.                             
  37.                                 <td valign="top" class="name">
  38.                                     <label for="staId"><g:message code="staff.staId" default="Sta Id" />:</label>
  39.                                 </td>
  40.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staId','errors')}">
  41.                                     <input type="text" readonly="true" maxlength="12" id="staId" name="staId" value="${fieldValue(bean:staff,field:'staId')}"/>
  42.                                 </td>
  43.                             </tr> 
  44.                         
  45.                             <tr class="prop">
  46.                                 <td valign="top" class="name">
  47.                                     <label for="staName"><g:message code="staff.staName" default="Sta Name" />:</label>
  48.                                 </td>
  49.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staName','errors')}">
  50.                                     <input type="text" maxlength="10" id="staName" name="staName" value="${fieldValue(bean:staff,field:'staName')}"/>
  51.                                 </td>
  52.                                 <td valign="top" class="name">
  53.                                     <label for="staEname"><g:message code="staff.staEname" default="Sta Ename" />:</label>
  54.                                 </td>
  55.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staEname','errors')}">
  56.                                     <input type="text" maxlength="20" id="staEname" name="staEname" value="${fieldValue(bean:staff,field:'staEname')}"/>
  57.                                 </td>
  58.                             </tr> 
  59.                         
  60.                             <tr class="prop">
  61.                                 <td valign="top" class="name">
  62.                                     <label for="staCard"><g:message code="staff.staCard" default="Sta Card" />:</label>
  63.                                 </td>
  64.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staCard','errors')}">
  65.                                     <input type="text" maxlength="20" id="staCard" name="staCard" value="${fieldValue(bean:staff,field:'staCard')}"/>
  66.                                 </td>
  67.                                 <td valign="top" class="name">
  68.                                     <label for="staSex"><g:message code="staff.staSex" default="Sta Sex" />:</label>
  69.                                 </td>
  70.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staSex','errors')}">
  71.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('SexType'))}" name="staSex.id" value="${staff?.staSex?.id}" ></g:select>
  72.                                 </td>
  73.                             </tr> 
  74.                         
  75.                             <tr class="prop">
  76.                                 <td valign="top" class="name">
  77.                                     <label for="staBirth"><g:message code="staff.staBirth" default="Sta Birth" />:</label>
  78.                                 </td>
  79.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staBirth','errors')}">
  80.                                     <g:datePicker name="staBirth" value="${staff?.staBirth}" precision="day"></g:datePicker>
  81.                                 </td>
  82.                                 <td valign="top" class="name">
  83.                                     <label for="staImage"><g:message code="staff.staImage" default="Sta Image" />:</label>
  84.                                 </td>
  85.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staImage','errors')}">
  86.                                     <input type="file" id="staImage" name="staImage" />
  87.                                 </td>
  88.                             </tr> 
  89.                         
  90.                             <tr class="prop">
  91.                                 <td valign="top" class="name">
  92.                                     <label for="staType"><g:message code="staff.staType" default="Sta Type" />:</label>
  93.                                 </td>
  94.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staType','errors')}">
  95.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('StaffType'))}" name="staType.id" value="${staff?.staType?.id}" ></g:select>
  96.                                 </td>
  97.                             
  98.                                 <td valign="top" class="name">
  99.                                     <label for="staDepartment"><g:message code="staff.staDepartment" default="Sta Department" />:</label>
  100.                                 </td>
  101.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staDepartment','errors')}">
  102.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Department'))}" name="staDepartment.id" value="${staff?.staDepartment?.id}" ></g:select>
  103.                                 </td>
  104.                             </tr> 
  105.                         
  106.                             <tr class="prop">
  107.                                 <td valign="top" class="name">
  108.                                     <label for="staPosition"><g:message code="staff.staPosition" default="Sta Position" />:</label>
  109.                                 </td>
  110.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staPosition','errors')}">
  111.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Position'))}" name="staPosition.id" value="${staff?.staPosition?.id}" noSelection="['null':'']"></g:select>
  112.                                 </td>
  113.                                 <td valign="top" class="name">
  114.                                     <label for="staCallinTime"><g:message code="staff.staCallinTime" default="Sta Callin Time" />:</label>
  115.                                 </td>
  116.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staCallinTime','errors')}">
  117.                                     <g:datePicker name="staCallinTime" value="${staff?.staCallinTime}" precision="day"></g:datePicker>
  118.                                 </td>
  119.                             </tr> 
  120.                         
  121.                             <tr class="prop">
  122.                                 <td valign="top" class="name">
  123.                                     <label for="staCometime"><g:message code="staff.staCometime" default="Sta Cometime" />:</label>
  124.                                 </td>
  125.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staCometime','errors')}">
  126.                                     <g:datePicker name="staCometime" value="${staff?.staCometime}" precision="day"></g:datePicker>
  127.                                 </td>
  128.                                 <td valign="top" class="name">
  129.                                     <label for="staWorkstate"><g:message code="staff.staWorkstate" default="Sta Workstate" />:</label>
  130.                                 </td>
  131.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staWorkstate','errors')}">
  132.                                     <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Workstate'))}" name="staWorkstate.id" value="${staff?.staWorkstate?.id}" ></g:select>
  133.                                 </td>
  134.                             </tr> 
  135.                         
  136.                             <tr class="prop">
  137.                                 <td valign="top" class="name">
  138.                                     <label for="staEmail"><g:message code="staff.staEmail" default="Sta Email" />:</label>
  139.                                 </td>
  140.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staEmail','errors')}">
  141.                                     <input type="text" maxlength="20" id="staEmail" name="staEmail" value="${fieldValue(bean:staff,field:'staEmail')}"/>
  142.                                 </td>
  143.                                 <td valign="top" class="name">
  144.                                     <label for="staTel1"><g:message code="staff.staTel1" default="Sta Tel1" />:</label>
  145.                                 </td>
  146.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staTel1','errors')}">
  147.                                     <input type="text" maxlength="20" id="staTel1" name="staTel1" value="${fieldValue(bean:staff,field:'staTel1')}"/>
  148.                                 </td>
  149.                             </tr> 
  150.                         
  151.                             <tr class="prop">
  152.                                 <td valign="top" class="name">
  153.                                     <label for="staTel2"><g:message code="staff.staTel2" default="Sta Tel2" />:</label>
  154.                                 </td>
  155.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staTel2','errors')}">
  156.                                     <input type="text" maxlength="20" id="staTel2" name="staTel2" value="${fieldValue(bean:staff,field:'staTel2')}"/>
  157.                                 </td>
  158.                                 <td valign="top" class="name">
  159.                                     <label for="staLinkman"><g:message code="staff.staLinkman" default="Sta Linkman" />:</label>
  160.                                 </td>
  161.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staLinkman','errors')}">
  162.                                     <input type="text" maxlength="10" id="staLinkman" name="staLinkman" value="${fieldValue(bean:staff,field:'staLinkman')}"/>
  163.                                 </td>
  164.                             </tr> 
  165.                         
  166.                             <tr class="prop">
  167.                                 <td valign="top" class="name">
  168.                                     <label for="staLinktel"><g:message code="staff.staLinktel" default="Sta Linktel" />:</label>
  169.                                 </td>
  170.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staLinktel','errors')}">
  171.                                     <input type="text" maxlength="20" id="staLinktel" name="staLinktel" value="${fieldValue(bean:staff,field:'staLinktel')}"/>
  172.                                 </td>
  173.                                 <td valign="top" class="name">
  174.                                     <label for="staMemo"><g:message code="staff.staMemo" default="Sta Memo" />:</label>
  175.                                 </td>
  176.                                 <td valign="top" class="value ${hasErrors(bean:staff,field:'staMemo','errors')}">
  177.                                     <textarea rows="5" cols="40" name="staMemo">${staff?.staMemo?.encodeAsHTML()}</textarea>
  178.                                 </td>
  179.                             </tr> 
  180.                         
  181.                             
  182.                         
  183.                         </tbody>
  184.                     </table>
  185.                 </div>
  186.                 <div class="buttons">
  187.                     <input type="hidden" name="_staId" value="${params._staId}" />
  188.                     <input type="hidden" name="_staName" value="${params._staName}" />
  189.                     <input type="hidden" name="_staType_id" value="${params._staType_id}" />
  190.                     <input type="hidden" name="_staLastchange" value="${params._staLastchangefrom}" />
  191.                     <input type="hidden" name="_staLastchange" value="${params._staLastchangeto}" />
  192.                     <input type="hidden" name="_staDel" value="${params._staDel}" />
  193.                     <input type="hidden" name="offset" value="${params.offset}" />
  194.                     <input type="hidden" name="sort" value="${params.sort}" />
  195.                     <input type="hidden" name="order" value="${params.order}" />                     
  196.                     <span class="button"><g:actionSubmit class="save" action="Update" value="${message(code:'update', 'default':'Update')}" /></span>
  197.                     <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>
  198.                     <span class="button"><input  class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'back', 'default':'Back')}"/> </span>
  199.                 </div>
  200.             </g:form>
  201.         </div>
  202.     </body>
  203. </html>