Skip to content

Commit

Permalink
1.0.7 - Bugfixes
Browse files Browse the repository at this point in the history
* [BUGFIX] fixed plugin text about available placeholder in mail text
* [BUGFIX] fixed error in application form when no messageMaxLength is configured
* [FEATURE] show all contacts if no contact is selected in the contact plugin
  • Loading branch information
itx-stefanie-doell authored Apr 18, 2022
2 parents bb68b95 + 5bfe267 commit 1be4eda
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 35 deletions.
6 changes: 3 additions & 3 deletions Classes/Controller/ApplicationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public function createAction(\ITX\Jobapplications\Domain\Model\Application $newA

// Verify length in message field;
// front end check is already covered, this should only block requests avoiding the frontend
if (strlen($newApplication->getMessage()) > (int)$this->settings['messageMaxLength'])
if (array_key_exists("messageMaxLength", $this->settings) && (strlen($newApplication->getMessage()) > (int)$this->settings['messageMaxLength']))
{
$this->addFlashMessage("Message too long", "Rejected", FlashMessage::ERROR);
$this->redirect("new", "Application", null, ["posting" => $posting]);
Expand Down Expand Up @@ -557,8 +557,8 @@ public function createAction(\ITX\Jobapplications\Domain\Model\Application $newA
break;
}
$body = str_replace("%applicantSalutation%", $salutation, $body);
$body = str_replace("%applicantFirstname%", $newApplication->getFirstName(), $body);
$body = str_replace("%applicantLastname%", $newApplication->getLastName(), $body);
$body = str_replace("%applicantFirstName%", $newApplication->getFirstName(), $body);
$body = str_replace("%applicantLastName%", $newApplication->getLastName(), $body);
$body = str_replace("%postingTitle%", $currentPosting->getTitle(), $body);

$mail
Expand Down
11 changes: 3 additions & 8 deletions Classes/Controller/ContactController.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,13 @@ public function listAction()
if (!empty($selectedContactsStr))
{
$contacts = explode(",", $selectedContactsStr);
$contactObjects = $this->contactRepository->findMultipleByUid($contacts);
}
$contactObjects = $this->contactRepository->findMultipleByUid($contacts);

$contactByUid = [];

foreach ($contactObjects as $contact)
else
{
$contactByUid[$contact->getLocalizedUid()] = $contact;
$contactObjects = $this->contactRepository->findAll();
}

$contactObjects = array_replace(array_flip($contacts), $contactByUid);

$this->view->assign('contacts', $contactObjects);
}
}
6 changes: 6 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
Changelog
=========

1.0.7 - Bugfixes
-----------------
* [BUGFIX] fixed plugin text about available placeholder in mail text
* [BUGFIX] fixed error in application form when no messageMaxLength is configured
* [FEATURE] show all contacts if no contact is selected in the contact plugin

1.0.6 - Build fix
-----------------
* this update contains no actual content, and only fixes a build issue
Expand Down
35 changes: 18 additions & 17 deletions Documentation/Developer/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,27 @@ If you want to have custom filters you can do that by performing three steps.
#. Configure every filter you want in TypoScript settings, like the default config:
.. code-block:: php
filter {
repositoryConfiguration {
division { // Relation name: This is the name you should assign the form element property and the constraint property
relation = division // Define the relation a la Repository query e.g.: posting.contact.email
relationType = equals // choose equals, contains or in. This depends on the given relation
}
filter {
repositoryConfiguration {
division { // Relation name: This is the name you should assign the form element property and the constraint property
relation = division // Define the relation a la Repository query e.g.: posting.contact.email
relationType = equals // choose equals, contains or in. This depends on the given relation
}
careerLevel {
relation = careerLevel
relationType = equals
}
careerLevel {
relation = careerLevel
relationType = equals
}
employmentType {
relation = employmentType
relationType = contains
}
employmentType {
relation = employmentType
relationType = contains
}
location {
relation = location
relationType = contains
location {
relation = location
relationType = contains
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ project = Jobapplications Extension
# ... (recommended) version, displayed next to title (desktop) and in <meta name="book-version"
# .................................................................................

release = 1.0.6
release = 1.0.7

# .................................................................................
# ... (recommended) displayed in footer
Expand Down
5 changes: 3 additions & 2 deletions Documentation/User/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ With this setting enabled, new fields will show up, so you can enter the texts f

* posting title: %postingTitle%
* applicant salutation: %applicantSalutation%
* applicant first name: %applicantFirstname%
* applicant last name: %applicantLastname%
* applicant first name: %applicantFirstName%
* applicant last name: %applicantLastName%

Should applications be saved in the backend?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -185,6 +185,7 @@ Placeholders:
* Lastname: %lastName%
* Firstname: %firstName%
* Salutation: %salutation%
* Posting Title: %postingTitle%

When the applicant entered *divers* or nothing as salutation the salutation will be automatically replaced with the
applicants first name.
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Language/locallang_backend.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<source>Should the referenced contact receive an E-Mail?</source>
</trans-unit>
<trans-unit id="flexform.sendEmailToApplicantText" resname="flexform.sendEmailToApplicantText">
<source>E-Mail to Applicant Text\nTemplating available: \nPosting Title: %postingTitle% \nApplicant Salutation: %applicantSalutation% \nApplicant Firstname: %applicantFirstname% \nApplicant Lastname: %applicantLastname%</source>
<source>E-Mail to Applicant Text\nTemplating available: \nPosting Title: %postingTitle% \nApplicant Salutation: %applicantSalutation% \nApplicant First name: %applicantFirstName% \nApplicant Last name: %applicantLastName%</source>
</trans-unit>
<trans-unit id="flexform.sendEmailToApplicantSubject" resname="flexform.sendEmailToApplicantSubject">
<source>E-Mail to Applicant Subject (Templating available: Posting Title: %postingTitle%)</source>
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Language/locallang_csh_flexform.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<header/>
<body>
<trans-unit id="settings.sendEmailToApplicantText.description" resname="settings.sendEmailToApplicantText.description">
<source>\nTemplating available: \nPosting Title: postingTitle \nApplicant Salutation: %applicantSalutation% \nApplicant Firstname: %applicantFirstname% \nApplicant Lastname: %applicantLastname%</source>
<source>\nTemplating available: \nPosting Title: postingTitle \nApplicant Salutation: %applicantSalutation% \nApplicant First name: %applicantFirstName% \nApplicant LastName: %applicantLastName%</source>
</trans-unit>
</body>
</file>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "typo3-cms-extension",
"description": "This extension enables you to manage job postings, has an application form for applicants to apply and an Application Managment Backend Module",
"license": "GPL-3.0-or-later",
"version": "1.0.6",
"version": "1.0.7",
"homepage": "http://www.itx.de",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'uploadfolder' => 1,
'createDirs' => '',
'clearCacheOnLoad' => 1,
'version' => '1.0.6',
'version' => '1.0.7',
'constraints' => [
'depends' => [
'typo3' => '9.5.0 - 10.4.99',
Expand Down

0 comments on commit 1be4eda

Please sign in to comment.