Changeset 154


Ignore:
Timestamp:
Feb 2, 2010, 10:30:47 AM (13 years ago)
Author:
jahn
Message:

Currently Sample extends Event. The Sample class might better be merged into the Event class.

File:
1 edited

Legend:

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

    r150 r154  
    2525
    2626
    27             <g:form action="save" method="post" >
     27            <g:form action="save" method="post" id="${eventInstance.id}">
    2828
    2929                <div class="dialog">
     
    7878
    7979
     80                            <tr class="prop">
     81                            <td>This is a sampling event </td>
     82                            <td valign="top" class="value ${hasErrors(bean: description, field: 'protocol', 'errors')}">
     83                                 <g:select name="mySampleEvent" id="mySampleEvent" from="${['yes','no']}" value="${isSamplingEvent}" onchange="${remoteFunction(action:'showSample', controller='event', update:'samplePartial', onComplete:'Effect.Appear(samplePartial)', id:params['id'], params:'\'wantSample=\' + this.value',)}" />
     84                            </td>
     85                            </tr>
     86
     87
    8088                        </tbody>
    8189
    8290
    8391
    84                              <tbody id="samplePartial"> </tbody>
     92                        <tbody id="samplePartial">
     93
     94                        <g:if  test="${(eventInstance.isSamplingEvent()) && (eventInstance.samples!=null)}" >
     95                                <% def list = eventInstance.samples %>
     96                                <% list.sort{ a,b -> a.name <=> b.name }%>
     97                                <g:each in="${list}">
     98                                <tr class="prop">
     99                                        <td valign="top" class="name" width=200 >
     100                                        <label><%=  it.name %> </label>
     101                                        </td>
     102                                        <td valign="top" class="name">
     103                                        <g:textField name="${it.name}" value="" />
     104                                        </td>
     105                                </tr>
     106                                </g:each>
     107                        </g:if>
     108                        </tbody>
     109
     110
    85111
    86112
     
    91117
    92118                <div class="buttons">
    93                     <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
     119                    <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Save')}" /></span>
    94120                </div>
    95121
Note: See TracChangeset for help on using the changeset viewer.