Added importCountry

This commit is contained in:
2025-01-22 16:52:49 +01:00
parent 180f8e5ae9
commit c2edfab9a2
14 changed files with 17805 additions and 482 deletions

View File

@@ -32,6 +32,7 @@ GridLayout
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
}
Label
@@ -45,6 +46,7 @@ GridLayout
Layout.fillWidth: true
placeholderText: "Pflichtfeld"
placeholderTextColor: "red"
onTextChanged: checkFields()
}
Label
@@ -56,6 +58,8 @@ GridLayout
{
id: street
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -68,6 +72,20 @@ GridLayout
{
id: postcode
Layout.fillWidth: true
editable: true
onCurrentTextChanged: checkFields()
onEditTextChanged: checkFields()
onActivated: currentValue
model: address_model
textRole: "display"
popup.height: 300
popup.y: postcode.y + 5 - (postcode.height * 2)
currentIndex: -1
onCurrentIndexChanged: city.currentIndex = postcode.currentIndex
validator: RegularExpressionValidator
{
regularExpression: /([0-9]{1,5})/
}
}
@@ -81,6 +99,15 @@ GridLayout
{
id: city
Layout.fillWidth: true
editable: true
onEditTextChanged: checkFields()
onCurrentTextChanged: checkFields()
model: address_model
textRole: "city"
popup.height: 300
popup.y: postcode.y + 5 - (postcode.height * 2)
currentIndex: -1
}
}
Label
@@ -92,6 +119,18 @@ GridLayout
{
id: phonenumber
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
text: qsTr("Mobil")
Layout.alignment: Qt.AlignRight
}
TextField
{
id: cellphone
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -102,6 +141,7 @@ GridLayout
{
id: email
Layout.fillWidth: true
placeholderTextColor: "red"
}
Label
{
@@ -128,6 +168,7 @@ GridLayout
id: jobdescription
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -140,6 +181,7 @@ GridLayout
id: workstart
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -152,6 +194,7 @@ GridLayout
id: workend
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -164,6 +207,7 @@ GridLayout
id: timetowork
Layout.fillWidth: true
visible: radio.children[1].checked
placeholderTextColor: "red"
}
Label
{
@@ -174,6 +218,7 @@ GridLayout
{
id: briefAnrede
Layout.fillWidth: true
placeholderTextColor: "red"
}
Item
@@ -181,5 +226,29 @@ GridLayout
Layout.fillHeight: true
Layout.columnSpan: 2
}
function checkPersonalField()
{
if (radio.children[0].checked)
{
return (firstname.text.trim() && lastname.text.trim())
}
else
{
console.log("Mitarbeiter")
return (firstname.text.trim() && lastname.text.trim())
}
}
function requiredField()
{
var pf = (radio.children[1].checked)?"Pflichtfeld":""
street.placeholderText = pf
phonenumber.placeholderText = pf
cellphone.placeholderText = pf
email.placeholderText = pf
jobdescription.placeholderText = pf
workstart.placeholderText = pf
workend.placeholderText = pf
timetowork.placeholderText = pf
briefAnrede.placeholderText = pf
}
}