From f7492909d3c62c92388b923481d7addf24e40ec8 Mon Sep 17 00:00:00 2001
From: Kevin Ditscheid <kevin.ditscheid@sgalinski.de>
Date: Fri, 15 Dec 2023 15:24:31 +0100
Subject: [PATCH] [BUGFIX] Change country select to the core select field

---
 .../Private/Templates/Joblist/ApplyForm.html  | 23 ++++++++-----------
 1 file changed, 10 insertions(+), 13 deletions(-)

diff --git a/Resources/Private/Templates/Joblist/ApplyForm.html b/Resources/Private/Templates/Joblist/ApplyForm.html
index 170e1593..fde80cc9 100644
--- a/Resources/Private/Templates/Joblist/ApplyForm.html
+++ b/Resources/Private/Templates/Joblist/ApplyForm.html
@@ -376,13 +376,11 @@
 								<label for="apply-country" class="smart-label">
 									<f:translate key="frontend.apply.country"/>
 								</label>
-								<f:form.select
-									value="{f:if(condition: '{sysLanguageUid} == 0', then: 'Deutschland', else: 'Germany')}"
-									property="country" id="apply-country" class="form-control"
-									options="{countries}"
-									optionLabelField="{f:if(condition: '{sysLanguageUid} == 0', then: 'cnShortDe', else: 'cnShortEn')}"
-									optionValueField="{f:if(condition: '{sysLanguageUid} == 0', then: 'cnShortDe', else: 'cnShortEn')}"
-								/>
+								<f:form.countrySelect
+									value="DE"
+									property="country"
+									id="apply-country"
+									class="form-control" />
 								<f:form.validationResults for="applyData.country">
 									<ul class="sg-jobs-validation-error parsley-errors-list filled">
 										<f:for each="{validationResults.errors}" as="error">
@@ -398,12 +396,11 @@
 								<label for="apply-nationality" class="smart-label">
 									<f:translate key="frontend.apply.nationality"/>
 								</label>
-								<f:form.select
-									value="{f:if(condition: '{sysLanguageUid} == 0', then: 'Deutschland', else: 'Germany')}"
-									property="nationality" id="apply-nationality" class="form-control" options="{countries}"
-									optionLabelField="{f:if(condition: '{sysLanguageUid} == 0', then: 'cnShortDe', else: 'cnShortEn')}"
-									optionValueField="{f:if(condition: '{sysLanguageUid} == 0', then: 'cnShortDe', else: 'cnShortEn')}"
-								/>
+								<f:form.countrySelect
+									value="DE"
+									property="nationality"
+									id="apply-nationality"
+									class="form-control" />
 								<f:form.validationResults for="applyData.nationality">
 									<ul class="sg-jobs-validation-error parsley-errors-list filled">
 										<f:for each="{validationResults.errors}" as="error">
-- 
GitLab