From 2df9cd91421e1dc5d614e8c7cb654038cf324a7f Mon Sep 17 00:00:00 2001 From: Tim Wagner <tim.wagner@sgalinski.de> Date: Tue, 8 Oct 2019 13:25:08 +0200 Subject: [PATCH] [TASK] Move always-included property to end of job schema This ensures the schema is always valid. Otherwise, it could end with a comma which is seen as invalid schema. --- Resources/Private/Partials/ApplyFormSchema.html | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Resources/Private/Partials/ApplyFormSchema.html b/Resources/Private/Partials/ApplyFormSchema.html index 28593e77..caa5ecb4 100644 --- a/Resources/Private/Partials/ApplyFormSchema.html +++ b/Resources/Private/Partials/ApplyFormSchema.html @@ -19,12 +19,6 @@ "validThrough": "{f:format.date(date: job.validThrough, format: 'Y-m-d')}", </f:if> - "hiringOrganization": {leftBrace} - "@type": "Organization", - "name": "{job.company.name}", - "sameAs": "<f:uri.page pageUid="1" absolute="TRUE"/>", - "logo": "<f:uri.image src="EXT:project_theme/Resources/Public/Images/logo-inverted.svg" absolute="TRUE"/>" - {rightBrace}, <f:if condition="{job.telecommutePossible}"> "jobLocationType": "TELECOMMUTE", @@ -42,6 +36,16 @@ {rightBrace}, </f:if> + <f:comment><!-- + We need a property that is certainly included to make sure the last property never ends with a comma. + //TODO Use logo and rootPage flexibly so the correct one is always used. + --></f:comment> + "hiringOrganization": {leftBrace} + "@type": "Organization", + "name": "{job.company.name}", + "sameAs": "<f:uri.page pageUid="1" absolute="TRUE"/>", + "logo": "<f:uri.image src="EXT:project_theme/Resources/Public/Images/logo-inverted.svg" absolute="TRUE"/>" + {rightBrace} {rightBrace} </script> </f:alias> -- GitLab