Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {namespace ev=Jpg\Events\ViewHelpers}
- <f:layout name="Default" />
- <f:section name="content">Edit event "{event.title}"
- <f:comment><!-- Display validation errors & flash Messages: http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide/PartII/Validation.html#displaying-validation-errors --></f:comment>
- <f:flashMessages class="flashmessages"/>
- <f:form.validationResults for="location">
- <f:if condition="{validationResults.flattenedErrors}">
- <div class="error">
- <dl>
- <f:for each="{validationResults.flattenedErrors}" key="propertyPath" as="errors">
- <dt>{propertyPath}</dt>
- <dd>
- <ul>
- <f:for each="{errors}" as="error">
- <li>{error}</li>
- </f:for>
- </ul>
- </dd>
- </f:for>
- </dl>
- </div>
- </f:if>
- </f:form.validationResults>
- <f:comment><!-- Display validation errors & flash Messages end --></f:comment>
- <f:form action="update" controller="Event" package="Jpg.Events" name="event" object="{event}">
- <label for="title">Title:</label><f:form.textfield id="title" property="title" />
- <br />
- <label for="location">Location:</label>
- <f:form.select property="location" id="location" options="{locations}" optionLabelField="name" />
- <br />
- <f:comment>
- <label for="persons">Persons:</label>
- <f:form.select property="persons" id="persons" options="{persons}" optionLabelField="name" multiple="multiple" size="3"/>
- <br />
- </f:comment>
- <f:for each="{persons}" as="person">
- <ev:inArray haystack="{event.persons}" needle="{person}" >
- <f:then>
- <f:form.checkbox property="persons" value="{f:format.identifier(value: person)}" checked="true" multiple="true"/><label>{person.name}</label><br/>
- </f:then>
- <f:else>
- <f:form.checkbox property="persons" value="{f:format.identifier(value: person)}" multiple="true"/><label>{person.name}</label><br/>
- </f:else>
- </ev:inArray>
- </f:for>
- <f:comment>
- <f:debug>{event.persons}</f:debug>
- <f:debug>{event}</f:debug>
- </f:comment>
- <f:form.submit value="Speichern" />
- </f:form>
- </f:section>
Advertisement
Add Comment
Please, Sign In to add comment