edit.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:4k
-
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- <meta name="layout" content="main" />
- <g:javascript library="applicat" />
- <title><g:message code="authority.edit" default="Edit Authority" /></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="authority.list" default="Authority List" /></g:link></span>
- <span class="menuButton"><g:link class="create" action="create"><g:message code="authority.new" default="New Authority" /></g:link></span>
- </div>
- <div class="body">
- <h1><g:message code="authority.edit" default="Edit Authority" /></h1>
- <g:if test="${flash.message}">
- <div class="message">${flash.message}</div>
- </g:if>
- <g:hasErrors bean="${authority}">
- <div class="errors">
- <g:renderErrors bean="${authority}" as="list" />
- </div>
- </g:hasErrors>
- <div class="prop">
- <span class="name">Id:</span>
- <span class="value">${authority?.id}</span>
- </div>
- <g:form controller="role" action="update" method="post" >
- <input type="hidden" name="id" value="${authority?.id}" />
- <div class="dialog">
- <table style="width:98%;background-color: #FFF;" cellpadding="0" cellspacing="0">
- <tbody>
- <tr class='prop'>
- <td valign='top' class='name'>
- <label for='authority'><g:message code="role.name" />:</label>
- </td>
- <td valign='top'
- class='value ${hasErrors(bean:authority,field:'authority','errors')}'>
- <input type="text" name='authority'
- value="${authority?.authority?.substring(5)?.toLowerCase()?.encodeAsHTML()}"/>
- </td>
- </tr>
- <tr class='prop'>
- <td valign='top' class='name'>
- <label for='description'><g:message code="role.description" />:</label>
- </td>
- <td valign='top'
- class='value ${hasErrors(bean:authority,field:'description','errors')}'>
- <input type="text" name='description'
- value="${authority?.description?.encodeAsHTML()}"/>
- </td>
- </tr>
- <tr class='prop'>
- <td valign='top' class='name'>
- <label for='people'><g:message code="role.people" />:</label>
- </td>
- <td valign='top'
- class='value ${hasErrors(bean:authority,field:'people','errors')}'>
- <ul>
- <g:each var='p' in='${authority?.people?}'>
- <li>${p}</li>
- </g:each>
- </ul>
- </td>
- </tr>
- <tr class='prop'>
- <td valign='top' class='name'>
- <label for='powerLevel'><g:message code="role.powerLevel" />:</label>
- </td>
- <td valign='top'
- class='value ${hasErrors(bean:authority,field:'powerLevel','errors')}'>
- <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>
- </td>
- </tr>
- <tr class='prop'>
- <td valign='top' class='name'><label for='url'><g:message code="role.url"/>:</label></td>
- <td valign='top' class='value ${hasErrors(bean:requestmap,field:'url','errors')}'>
- <g:editAllAction allurl="${grailsApplication.controllerClasses}" checkedurl="${Requestmap.findAllByConfigAttributeLike('%' + authority.authority.toUpperCase() + ',%')}" ></g:editAllAction>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="buttons">
- <span class="button"><g:actionSubmit class="save" action="update" value="${message(code:'default.update')}" /></span>
- <span class="button"><input class="delete" type="button" onclick=" history.go(-1);" value="${message(code:'default.return', 'default':'Return')}"/> </span>
- </div>
- </g:form>
- </div>
- </body>
- </html>