Ignore:
Timestamp:
Oct 9, 2009, 10:11:43 PM (15 years ago)
Author:
gav
Message:

Add params.message to Person create and edit views.
Code format to 4 spaces, no tabs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/views/authority/edit.gsp

    r59 r150  
    11<head>
    2         <meta name="layout" content="main" />
    3         <title>Edit Authority</title>
     2    <meta name="layout" content="main" />
     3    <title>Edit Authority</title>
    44</head>
    55
    66<body>
    77
    8         <div class="nav">
    9                 <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
    10                 <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
    11                 <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
    12         </div>
     8    <div class="nav">
     9        <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
     10        <span class="menuButton"><g:link class="list" action="list">Authority List</g:link></span>
     11        <span class="menuButton"><g:link class="create" action="create">New Authority</g:link></span>
     12    </div>
    1313
    14         <div class="body">
    15                 <h1>Edit Authority</h1>
    16                 <g:if test="${flash.message}">
    17                 <div class="message">${flash.message}</div>
    18                 </g:if>
    19                 <g:hasErrors bean="${authority}">
    20                 <div class="errors">
    21                         <g:renderErrors bean="${authority}" as="list" />
    22                 </div>
    23                 </g:hasErrors>
    24                 <div class="prop">
    25                         <span class="name">ID:</span>
    26                         <span class="value">${authority.id}</span>
    27                 </div>
    28                 <g:form>
    29                         <input type="hidden" name="id" value="${authority.id}" />
    30                         <input type="hidden" name="version" value="${authority.version}" />
    31                         <div class="dialog">
    32                         <table>
    33                         <tbody>
    34                                 <tr class="prop">
    35                                         <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
    36                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
    37                                                 <input type="text" id="authority" name="authority" value="${authority.authority?.encodeAsHTML()}"/>
    38                                         </td>
    39                                 </tr>
     14    <div class="body">
     15        <h1>Edit Authority</h1>
     16        <g:if test="${flash.message}">
     17        <div class="message">${flash.message}</div>
     18        </g:if>
     19        <g:hasErrors bean="${authority}">
     20        <div class="errors">
     21            <g:renderErrors bean="${authority}" as="list" />
     22        </div>
     23        </g:hasErrors>
     24        <div class="prop">
     25            <span class="name">ID:</span>
     26            <span class="value">${authority.id}</span>
     27        </div>
     28        <g:form>
     29            <input type="hidden" name="id" value="${authority.id}" />
     30            <input type="hidden" name="version" value="${authority.version}" />
     31            <div class="dialog">
     32            <table>
     33            <tbody>
     34                <tr class="prop">
     35                    <td valign="top" class="name"><label for="authority">Authority Name:</label></td>
     36                    <td valign="top" class="value ${hasErrors(bean:authority,field:'authority','errors')}">
     37                        <input type="text" id="authority" name="authority" value="${authority.authority?.encodeAsHTML()}"/>
     38                    </td>
     39                </tr>
    4040
    41                                 <tr class="prop">
    42                                         <td valign="top" class="name"><label for="description">Description:</label></td>
    43                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
    44                                                 <input type="text" id="description" name="description" value="${authority.description?.encodeAsHTML()}"/>
    45                                         </td>
    46                                 </tr>
     41                <tr class="prop">
     42                    <td valign="top" class="name"><label for="description">Description:</label></td>
     43                    <td valign="top" class="value ${hasErrors(bean:authority,field:'description','errors')}">
     44                        <input type="text" id="description" name="description" value="${authority.description?.encodeAsHTML()}"/>
     45                    </td>
     46                </tr>
    4747
    48                                 <tr class="prop">
    49                                         <td valign="top" class="name"><label for="persons">Persons:</label></td>
    50                                         <td valign="top" class="value ${hasErrors(bean:authority,field:'persons','errors')}">
    51                                                 <ul>
    52                                                 <g:each var="p" in="${authority.persons?}">
    53                                                         <li>${p}</li>
    54                                                 </g:each>
    55                                                 </ul>
    56                                         </td>
    57                                 </tr>
    58                         </tbody>
    59                         </table>
    60                         </div>
     48                <tr class="prop">
     49                    <td valign="top" class="name"><label for="persons">Persons:</label></td>
     50                    <td valign="top" class="value ${hasErrors(bean:authority,field:'persons','errors')}">
     51                        <ul>
     52                        <g:each var="p" in="${authority.persons?}">
     53                            <li>${p}</li>
     54                        </g:each>
     55                        </ul>
     56                    </td>
     57                </tr>
     58            </tbody>
     59            </table>
     60            </div>
    6161
    62                         <div class="buttons">
    63                                 <span class="button"><g:actionSubmit class="save" value="Update" /></span>
    64                                 <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
    65                         </div>
     62            <div class="buttons">
     63                <span class="button"><g:actionSubmit class="save" value="Update" /></span>
     64                <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
     65            </div>
    6666
    67                 </g:form>
    68         </div>
     67        </g:form>
     68    </div>
    6969</body>
Note: See TracChangeset for help on using the changeset viewer.