From 771f7feeff65eefb30cbcbc569afaf8717187478 Mon Sep 17 00:00:00 2001 From: sdl Date: Mon, 11 Apr 2022 21:17:00 +0200 Subject: [PATCH 1/5] fix[application plugin]: #57 fixed plugin text about available placeholder in mail text --- Documentation/User/Index.rst | 1 + Resources/Private/Language/locallang_backend.xlf | 2 +- Resources/Private/Language/locallang_csh_flexform.xlf | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/User/Index.rst b/Documentation/User/Index.rst index 4381b1c..c01ddbf 100644 --- a/Documentation/User/Index.rst +++ b/Documentation/User/Index.rst @@ -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. diff --git a/Resources/Private/Language/locallang_backend.xlf b/Resources/Private/Language/locallang_backend.xlf index 1cb7e95..04d36ba 100644 --- a/Resources/Private/Language/locallang_backend.xlf +++ b/Resources/Private/Language/locallang_backend.xlf @@ -52,7 +52,7 @@ Should the referenced contact receive an E-Mail? - E-Mail to Applicant Text\nTemplating available: \nPosting Title: %postingTitle% \nApplicant Salutation: %applicantSalutation% \nApplicant Firstname: %applicantFirstname% \nApplicant Lastname: %applicantLastname% + E-Mail to Applicant Text\nTemplating available: \nPosting Title: %postingTitle% \nApplicant Salutation: %applicantSalutation% \nApplicant First name: %applicantFirstName% \nApplicant Last name: %applicantLastName% E-Mail to Applicant Subject (Templating available: Posting Title: %postingTitle%) diff --git a/Resources/Private/Language/locallang_csh_flexform.xlf b/Resources/Private/Language/locallang_csh_flexform.xlf index c114793..9b94433 100644 --- a/Resources/Private/Language/locallang_csh_flexform.xlf +++ b/Resources/Private/Language/locallang_csh_flexform.xlf @@ -4,7 +4,7 @@
- \nTemplating available: \nPosting Title: postingTitle \nApplicant Salutation: %applicantSalutation% \nApplicant Firstname: %applicantFirstname% \nApplicant Lastname: %applicantLastname% + \nTemplating available: \nPosting Title: postingTitle \nApplicant Salutation: %applicantSalutation% \nApplicant First name: %applicantFirstName% \nApplicant LastName: %applicantLastName% From fbff7d5c8d671eea7dc1ff3cb4a87b51f27145e6 Mon Sep 17 00:00:00 2001 From: sdl Date: Mon, 11 Apr 2022 21:18:02 +0200 Subject: [PATCH 2/5] fix[application]: resolved error when no messageMaxLength is configured --- Classes/Controller/ApplicationController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Controller/ApplicationController.php b/Classes/Controller/ApplicationController.php index a54a5f5..bd557e3 100644 --- a/Classes/Controller/ApplicationController.php +++ b/Classes/Controller/ApplicationController.php @@ -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]); @@ -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 From 65b2b25edb40f0ee4fba468c4fd4132fa0875556 Mon Sep 17 00:00:00 2001 From: sdl Date: Mon, 11 Apr 2022 21:19:08 +0200 Subject: [PATCH 3/5] feat[contact plugin]: show all contacts if none is selected in the pluin --- Classes/Controller/ContactController.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Classes/Controller/ContactController.php b/Classes/Controller/ContactController.php index d6f9825..36f53d2 100644 --- a/Classes/Controller/ContactController.php +++ b/Classes/Controller/ContactController.php @@ -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); } } From 59111f8f1e65ecc82b04a15623fe2dfa91191c2a Mon Sep 17 00:00:00 2001 From: sdl Date: Mon, 11 Apr 2022 21:32:19 +0200 Subject: [PATCH 4/5] fix: Documentation --- Documentation/User/Index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/User/Index.rst b/Documentation/User/Index.rst index c01ddbf..6da6c47 100644 --- a/Documentation/User/Index.rst +++ b/Documentation/User/Index.rst @@ -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? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 5bfe2670b5eac3e408d9b4dc48500e44e5bb8d65 Mon Sep 17 00:00:00 2001 From: sdl Date: Mon, 18 Apr 2022 20:20:23 +0200 Subject: [PATCH 5/5] 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 --- Documentation/ChangeLog/Index.rst | 6 ++++++ Documentation/Developer/Index.rst | 35 ++++++++++++++++--------------- Documentation/Settings.cfg | 2 +- composer.json | 2 +- ext_emconf.php | 2 +- 5 files changed, 27 insertions(+), 20 deletions(-) diff --git a/Documentation/ChangeLog/Index.rst b/Documentation/ChangeLog/Index.rst index a78ba9f..a380656 100644 --- a/Documentation/ChangeLog/Index.rst +++ b/Documentation/ChangeLog/Index.rst @@ -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 diff --git a/Documentation/Developer/Index.rst b/Documentation/Developer/Index.rst index 9cbbbe7..49d39c7 100644 --- a/Documentation/Developer/Index.rst +++ b/Documentation/Developer/Index.rst @@ -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 + } } } diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index ec7ce07..bc4a029 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -27,7 +27,7 @@ project = Jobapplications Extension # ... (recommended) version, displayed next to title (desktop) and in 1, 'createDirs' => '', 'clearCacheOnLoad' => 1, - 'version' => '1.0.6', + 'version' => '1.0.7', 'constraints' => [ 'depends' => [ 'typo3' => '9.5.0 - 10.4.99',