create.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:14k
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta name="layout" content="main" />
- <title><g:message code="staff.create" default="Create Staff" /></title>
- </head>
- <body>
- <div class="nav">
- <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
- <span class="menuButton"><g:link class="list" action="list"><g:message code="staff.list" default="Staff List" /></g:link></span>
- </div>
- <div class="body">
- <h1><g:message code="staff.create" default="Create Staff" /></h1>
- <g:if test="${flash.message}">
- <div class="message"><g:message code="${flash.message}" args="${flash.args}" default="${flash.defaultMessage}" /></div>
- </g:if>
- <g:hasErrors bean="${staff}">
- <div class="errors">
- <g:renderErrors bean="${staff}" as="list" />
- </div>
- </g:hasErrors>
- <g:form action="save" method="post" enctype="multipart/form-data">
- <div class="dialog">
- <table>
- <tbody>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="person"><g:message code="staff.person" default="Person" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'person','errors')}">
- <g:select optionKey="id" from="${Person.list()}" name="person.id" value="${staff?.person?.id}" noSelection="['null':'']"></g:select>
- </td>
- </tr>
-
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staName"><g:message code="staff.staName" default="Sta Name" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staName','errors')}">
- <input type="text" maxlength="10" id="staName" name="staName" value="${fieldValue(bean:staff,field:'staName')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="staEname"><g:message code="staff.staEname" default="Sta Ename" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staEname','errors')}">
- <input type="text" maxlength="20" id="staEname" name="staEname" value="${fieldValue(bean:staff,field:'staEname')}"/>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staCard"><g:message code="staff.staCard" default="Sta Card" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staCard','errors')}">
- <input type="text" maxlength="20" id="staCard" name="staCard" value="${fieldValue(bean:staff,field:'staCard')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="staSex"><g:message code="staff.staSex" default="Sta Sex" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staSex','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('SexType'))}" name="staSex.id" value="${staff?.staSex?.id}" ></g:select>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staBirth"><g:message code="staff.staBirth" default="Sta Birth" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staBirth','errors')}">
- <g:datePicker name="staBirth" value="${staff?.staBirth}" precision="day"></g:datePicker>
- </td>
-
- <td valign="top" class="name">
- <label for="staImage"><g:message code="staff.staImage" default="Sta Image" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staImage','errors')}">
- <input type="file" id="staImage" name="staImage" />
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staType"><g:message code="staff.staType" default="Sta Type" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staType','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('StaffType'))}" name="staType.id" value="${staff?.staType?.id}" ></g:select>
- </td>
-
- <td valign="top" class="name">
- <label for="staDepartment"><g:message code="staff.staDepartment" default="Sta Department" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staDepartment','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Department'))}" name="staDepartment.id" value="${staff?.staDepartment?.id}" ></g:select>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staPosition"><g:message code="staff.staPosition" default="Sta Position" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staPosition','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Position'))}" name="staPosition.id" value="${staff?.staPosition?.id}" ></g:select>
- </td>
- <td valign="top" class="name">
- <label for="staCallinTime"><g:message code="staff.staCallinTime" default="Sta Callin Time" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staCallinTime','errors')}">
- <g:datePicker name="staCallinTime" value="${staff?.staCallinTime}" precision="day"></g:datePicker>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staCometime"><g:message code="staff.staCometime" default="Sta Cometime" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staCometime','errors')}">
- <g:datePicker name="staCometime" value="${staff?.staCometime}" precision="day"></g:datePicker>
- </td>
- <td valign="top" class="name">
- <label for="staWorkstate"><g:message code="staff.staWorkstate" default="Sta Workstate" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staWorkstate','errors')}">
- <g:select optionKey="id" from="${Code.findAllByCkind(Ckind.findByCkiFlag('Workstate'))}" name="staWorkstate.id" value="${staff?.staWorkstate?.id}" ></g:select>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staEmail"><g:message code="staff.staEmail" default="Sta Email" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staEmail','errors')}">
- <input type="text" maxlength="20" id="staEmail" name="staEmail" value="${fieldValue(bean:staff,field:'staEmail')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="staTel1"><g:message code="staff.staTel1" default="Sta Tel1" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staTel1','errors')}">
- <input type="text" maxlength="20" id="staTel1" name="staTel1" value="${fieldValue(bean:staff,field:'staTel1')}"/>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staTel2"><g:message code="staff.staTel2" default="Sta Tel2" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staTel2','errors')}">
- <input type="text" maxlength="20" id="staTel2" name="staTel2" value="${fieldValue(bean:staff,field:'staTel2')}"/>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staLinkman"><g:message code="staff.staLinkman" default="Sta Linkman" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staLinkman','errors')}">
- <input type="text" maxlength="10" id="staLinkman" name="staLinkman" value="${fieldValue(bean:staff,field:'staLinkman')}"/>
- </td>
-
- <td valign="top" class="name">
- <label for="staLinktel"><g:message code="staff.staLinktel" default="Sta Linktel" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staLinktel','errors')}">
- <input type="text" maxlength="20" id="staLinktel" name="staLinktel" value="${fieldValue(bean:staff,field:'staLinktel')}"/>
- </td>
- </tr>
-
- <tr class="prop">
- <td valign="top" class="name">
- <label for="staMemo"><g:message code="staff.staMemo" default="Sta Memo" />:</label>
- </td>
- <td valign="top" class="value ${hasErrors(bean:staff,field:'staMemo','errors')}">
- <textarea rows="5" cols="40" name="staMemo">${staff?.staMemo?.encodeAsHTML()}</textarea>
- </td>
- </tr>
-
-
-
- </tbody>
- </table>
- </div>
- <div class="buttons">
- <input type="hidden" name="_staId" value="${params._staId}" />
- <input type="hidden" name="_staName" value="${params._staName}" />
- <input type="hidden" name="_staType_id" value="${params._staType_id}" />
- <input type="hidden" name="_staLastchange" value="${params._staLastchangefrom}" />
- <input type="hidden" name="_staLastchange" value="${params._staLastchangeto}" />
- <input type="hidden" name="_staDel" value="${params._staDel}" />
- <input type="hidden" name="offset" value="${params.offset}" />
- <input type="hidden" name="sort" value="${params.sort}" />
- <input type="hidden" name="order" value="${params.order}" />
- <span class="button"><input class="save" type="submit" value="${message(code:'create', 'default':'Create')}" /></span>
- <span class="button"><input class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'back', 'default':'Back')}"/> </span>
- </div>
- </g:form>
- </div>
- </body>
- </html>