Jafix

Event/Edit.html Template

Mar 8th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.08 KB | None | 0 0
  1. {namespace ev=Jpg\Events\ViewHelpers}
  2. <f:layout name="Default" />
  3.  
  4. <f:section name="content">Edit event "{event.title}"
  5.  
  6. <f:comment><!-- Display validation errors & flash Messages: http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Validation.html#displaying-validation-errors --></f:comment>
  7. <f:flashMessages class="flashmessages"/>
  8. <f:form.validationResults for="location">
  9.     <f:if condition="{validationResults.flattenedErrors}">
  10.         <div class="error">
  11.             <dl>
  12.                 <f:for each="{validationResults.flattenedErrors}" key="propertyPath" as="errors">
  13.                     <dt>{propertyPath}</dt>
  14.                         <dd>
  15.                             <ul>
  16.                                 <f:for each="{errors}" as="error">
  17.                                     <li>{error}</li>
  18.                                 </f:for>
  19.                             </ul>
  20.                         </dd>
  21.                 </f:for>
  22.             </dl>
  23.         </div>
  24.     </f:if>
  25. </f:form.validationResults>
  26. <f:comment><!-- Display validation errors & flash Messages end --></f:comment>
  27.  
  28.     <f:form action="update" controller="Event" package="Jpg.Events" name="event" object="{event}">
  29.         <label for="title">Title:</label><f:form.textfield id="title" property="title" />
  30.         <br />
  31.  
  32.         <label for="location">Location:</label>
  33.             <f:form.select property="location" id="location" options="{locations}" optionLabelField="name" />
  34.         <br />
  35.  
  36.         <f:comment>
  37.         <label for="persons">Persons:</label>
  38.             <f:form.select property="persons" id="persons" options="{persons}" optionLabelField="name" multiple="multiple" size="3"/>
  39.         <br />
  40.         </f:comment>
  41.  
  42.         <f:for each="{persons}" as="person">
  43.             <ev:inArray haystack="{event.persons}" needle="{person}" >
  44.                 <f:then>
  45.                     <f:form.checkbox property="persons" value="{f:format.identifier(value: person)}" checked="true" multiple="true"/><label>{person.name}</label><br/>
  46.                 </f:then>
  47.                 <f:else>
  48.                     <f:form.checkbox property="persons" value="{f:format.identifier(value: person)}" multiple="true"/><label>{person.name}</label><br/>
  49.                 </f:else>
  50.             </ev:inArray>
  51.         </f:for>
  52.  
  53.         <f:comment>
  54.             <f:debug>{event.persons}</f:debug>
  55.             <f:debug>{event}</f:debug>
  56.         </f:comment>
  57.  
  58.  
  59.  
  60.         <f:form.submit value="Speichern" />
  61.     </f:form>
  62. </f:section>
Advertisement
Add Comment
Please, Sign In to add comment