Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_jobs
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_jobs
Commits
1cbf3515
Commit
1cbf3515
authored
7 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Use collections only if necessary
parent
762062e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Domain/Model/JobApplication.php
+9
-11
9 additions, 11 deletions
Classes/Domain/Model/JobApplication.php
Resources/Private/Templates/Joblist/ApplyForm.html
+1
-20
1 addition, 20 deletions
Resources/Private/Templates/Joblist/ApplyForm.html
with
10 additions
and
31 deletions
Classes/Domain/Model/JobApplication.php
+
9
−
11
View file @
1cbf3515
...
...
@@ -119,13 +119,13 @@ class JobApplication extends AbstractEntity {
protected
$email
=
''
;
/**
* @var \TYPO3\CMS\Extbase\
Persistence\ObjectStorag
e $coverLetter
* @var \TYPO3\CMS\Extbase\
Domain\Model\FileReferenc
e $coverLetter
*
*/
protected
$coverLetter
;
/**
* @var \TYPO3\CMS\Extbase\
Persistence\ObjectStorag
e $cv
* @var \TYPO3\CMS\Extbase\
Domain\Model\FileReferenc
e $cv
*
*/
protected
$cv
;
...
...
@@ -145,8 +145,6 @@ class JobApplication extends AbstractEntity {
* JobApplication constructor.
*/
public
function
__construct
()
{
$this
->
coverLetter
=
new
ObjectStorage
();
$this
->
cv
=
new
ObjectStorage
();
$this
->
certificates
=
new
ObjectStorage
();
}
...
...
@@ -347,30 +345,30 @@ class JobApplication extends AbstractEntity {
}
/**
* @return
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<
\TYPO3\CMS\Extbase\Domain\Model\FileReference
>
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
public
function
getCoverLetter
()
{
return
$this
->
coverLetter
;
}
/**
* @param
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<
\TYPO3\CMS\Extbase\Domain\Model\FileReference
>
$coverLetter
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $coverLetter
*/
public
function
setCoverLetter
(
ObjectStorag
e
$coverLetter
)
{
public
function
setCoverLetter
(
\TYPO3\CMS\Extbase\Domain\Model\FileReferenc
e
$coverLetter
)
{
$this
->
coverLetter
=
$coverLetter
;
}
/**
* @return
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<
\TYPO3\CMS\Extbase\Domain\Model\FileReference
>
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
public
function
getCv
()
{
return
$this
->
cv
;
}
/**
* @param
\TYPO3\CMS\Extbase\Persistence\ObjectStorage<
\TYPO3\CMS\Extbase\Domain\Model\FileReference
>
$cv
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $cv
*/
public
function
setCV
(
ObjectStorag
e
$cv
)
{
public
function
setCV
(
\TYPO3\CMS\Extbase\Domain\Model\FileReferenc
e
$cv
)
{
$this
->
cv
=
$cv
;
}
...
...
@@ -382,7 +380,7 @@ class JobApplication extends AbstractEntity {
}
/**
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage
<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
$certificates
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $certificates
*/
public
function
setCertificates
(
ObjectStorage
$certificates
)
{
$this
->
certificates
=
$certificates
;
...
...
This diff is collapsed.
Click to expand it.
Resources/Private/Templates/Joblist/ApplyForm.html
+
1
−
20
View file @
1cbf3515
...
...
@@ -180,7 +180,6 @@
<f:translate
key=
"frontend.apply.allowed_file_extensions"
/>
{allowedFileExtensions}
</label>
<h:form.upload
property=
"coverLetter"
id=
"apply-cover-letter"
additionalAttributes=
"{accept: '{allowedMimeTypes}'}"
/>
<f:comment><h:form.upload
property=
"coverLetter.0"
>
test
</h:form.upload></f:comment>
<f:for
each=
"{uploadedFiles.coverLetter}"
as=
"file"
>
<div
class=
"sg-jobs-uploaded-file"
>
<span
class=
"filename"
>
{file.name}
</span>
...
...
@@ -188,24 +187,6 @@
</div>
</f:for>
<f:comment>
<h:form.upload
property=
"image"
>
<f:if
condition=
"{resource}"
>
<f:image
image=
"{resource}"
alt=
""
width=
"50"
/>
</f:if>
</h:form.upload><br
/>
<label
for=
"image_collection"
>
<f:translate
key=
"tx_uploadexample_domain_model_example.image_collection"
/>
</label><br
/>
<h:form.upload
property=
"imageCollection.0"
>
<f:if
condition=
"{resource}"
>
<f:image
image=
"{resource}"
alt=
""
width=
"50"
/>
</f:if>
</h:form.upload>
</f:comment>
<f:form.validationResults
for=
"applyData.coverLetter"
>
<f:for
each=
"{validationResults.errors}"
as=
"error"
>
<div
class=
"sg-jobs-validation-error"
>
...
...
@@ -241,7 +222,7 @@
<f:translate
key=
"frontend.apply.certificates"
/>
<f:translate
key=
"frontend.apply.allowed_file_extensions"
/>
{allowedFileExtensions}
</label>
<h:form.upload
multiple=
"true"
property=
"certificates"
id=
"apply-certificates"
additionalAttributes=
"{accept: '{allowedMimeTypes}'}"
/>
<h:form.upload
multiple=
"true"
property=
"certificates
.0
"
id=
"apply-certificates"
additionalAttributes=
"{accept: '{allowedMimeTypes}'}"
/>
<f:for
each=
"{uploadedFiles.certificates}"
as=
"file"
>
<div
class=
"sg-jobs-uploaded-file"
>
<span
class=
"filename"
>
{file.name}
</span>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment