Skip to content

Commit 92116af

Browse files
committed
Fix more Fluid namespace issues
1 parent c22877f commit 92116af

File tree

2 files changed

+15
-33
lines changed

2 files changed

+15
-33
lines changed

Resources/Private/Templates/NodeTypes/Partials/FormErrors.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<f:validation.results for="{for}">
1+
<nf:validation.results for="{for}">
22
<f:if condition="{validationResults.flattenedErrors}">
33
<dl class="errors">
44
<f:for as="errors" each="{validationResults.flattenedErrors}" key="propertyPath">
@@ -11,4 +11,4 @@
1111
</f:for>
1212
</dl>
1313
</f:if>
14-
</f:validation.results>
14+
</nf:validation.results>
Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1+
{namespace f=TYPO3Fluid\Fluid\ViewHelpers}
12
{namespace nf=Neos\FluidAdaptor\ViewHelpers}
23
{namespace neos=Neos\Neos\ViewHelpers}
34
{namespace fusion=Neos\Fusion\ViewHelpers}
4-
<script src="../../../Public/JavaScript/jquery-1.10.2.min.js"></script>
5-
<script>
6-
$(function () {
7-
$('#newCommentForm').submit(function (event) {
8-
var form = $(this);
9-
$.ajax({
10-
type: form.attr('method'),
11-
url: form.attr('action'),
12-
data: form.serialize()
13-
}).done(function (result) {
14-
alert(result);
15-
location.reload(true);
16-
}).fail(function (result) {
17-
alert(result.responseText.substring(4));
18-
});
19-
event.preventDefault();
20-
});
21-
});
22-
</script>
235
<article itemscope="" itemtype="http://schema.org/Article" class="robertlemke-plugin-blog" xmlns:f="http://www.w3.org/1999/html">
246
<nf:flashMessages class="flashmessages"/>
257
<header>
@@ -30,7 +12,7 @@ <h1 itemprop="name headline">
3012
by
3113
<span itemprop="author" itemscope="" itemtype="http://schema.org/Person"><span itemprop="name">{author}</span></span>
3214
on
33-
<time datetime="{f:format.date(date: node.properties.datePublished, format: 'c')}" itemprop="datePublished">{nf:format.date(date: node.properties.datePublished, format: 'F jS, Y')}
15+
<time datetime="{nf:format.date(date: node.properties.datePublished, format: 'c')}" itemprop="datePublished">{nf:format.date(date: node.properties.datePublished, format: 'F jS, Y')}
3416
</time>
3517
</div>
3618
<br/>
@@ -42,33 +24,33 @@ <h1 itemprop="name headline">
4224
<div id="comments" class="comments">
4325
<f:if condition="{numberOfComments}">
4426
<h3>
45-
<f:translate package="RobertLemke.Plugin.Blog">Comments</f:translate>
27+
<nf:translate package="RobertLemke.Plugin.Blog">Comments</nf:translate>
4628
</h3>
4729
<ol class="commentlist">
4830
<fusion:render path="comments"/>
4931
</ol>
5032
<div class="clear"></div>
5133
</f:if>
5234
<h3>
53-
<f:translate package="RobertLemke.Plugin.Blog">Leave a reply</f:translate>
35+
<nf:translate package="RobertLemke.Plugin.Blog">Leave a reply</nf:translate>
5436
</h3>
5537
<f:render partial="FormErrors" arguments="{for: 'newComment'}"/>
56-
<f:form action="create" controller="Comment" package="RobertLemke.Plugin.Blog" object="{newComment}" name="newComment" class="newcomment" id="newCommentForm">
57-
<f:form.hidden name="postNode" value="{node.path}"/>
38+
<nf:form action="create" controller="Comment" package="RobertLemke.Plugin.Blog" object="{newComment}" name="newComment" class="newcomment" id="newCommentForm">
39+
<nf:form.hidden name="postNode" value="{node.path}"/>
5840
<label for="comment.author">
5941
<f:format.raw>
60-
<f:translate package="RobertLemke.Plugin.Blog">Name <span class="required">*</span></f:translate>
42+
<nf:translate package="RobertLemke.Plugin.Blog">Name <span class="required">*</span></nf:translate>
6143
</f:format.raw>
6244
</label>
63-
<f:form.textfield id="comment.author" property="author"/>
45+
<nf:form.textfield id="comment.author" property="author"/>
6446
<label for="comment.emailaddress">
6547
<f:format.raw>
66-
<f:translate package="RobertLemke.Plugin.Blog">Email <span class="required">*</span> (won't be displayed)</f:translate>
48+
<nf:translate package="RobertLemke.Plugin.Blog">Email <span class="required">*</span> (won't be displayed)</nf:translate>
6749
</f:format.raw>
6850
</label>
69-
<f:form.textfield id="comment.emailaddress" property="emailAddress"/>
70-
<f:form.textarea id="comment.text" property="text" rows="10" cols="50"/>
71-
<button class="secondary button">{f:translate(value: 'Submit', package: 'Neos.Flow')}</button>
72-
</f:form>
51+
<nf:form.textfield id="comment.emailaddress" property="emailAddress"/>
52+
<nf:form.textarea id="comment.text" property="text" rows="10" cols="50"/>
53+
<button class="secondary button" type="submit">{nf:translate(value: 'Submit')}</button>
54+
</nf:form>
7355
</div>
7456
</article>

0 commit comments

Comments
 (0)