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

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