Commit c43aa1b1 authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Removed flickable from PageGovService.

parent 44a6e3b0
......@@ -60,7 +60,7 @@ ScrollableListView {
width: parent.width
InputLineMenu {
id: icox
inputTextControl: icoText
inputTextControl: textField
isPassword: false
}
onPressAndHold: {
......
......@@ -38,24 +38,10 @@ Item {
property string gsInternId
property string gsFullName
property string gsInstName
property string gsReqField
Component.onCompleted: {
gov.loadFormToModel(userName, gsInternId, govFormModel)
actionButton.enabled = govFormModel.haveAllMandatory()
if (gsReqField === "ic") {
icoLabel.visible = true
icoText.visible = icoLabel.visible
} else if (gsReqField === "date") {
fromDateLabel.visible = true
toDateLabel.visible = fromDateLabel.visible
fromDateText.visible = fromDateLabel.visible
toDateText.visible = fromDateLabel.visible
} else if (gsReqField === "rpid") {
drvlicLabel.visible = true
drvlicText.visible = drvlicLabel.visible
}
}
GovFormListModel {
......@@ -135,8 +121,7 @@ Item {
id: formList
z: 0
anchors.top: formPane.bottom
//anchors.bottom: parent.bottom
height: 400 // TODO -- remove
anchors.bottom: parent.bottom
clip: true
spacing: 1
opacity: 1
......@@ -145,140 +130,15 @@ Item {
interactive: true
model: govFormModel
}
Flickable { // TODO -- remove
id: flickable
z: 0
anchors.top: formList.bottom
anchors.right: parent.right
anchors.left: parent.left
anchors.bottom: parent.bottom
contentHeight: flickContent.implicitHeight
Pane {
id: flickContent
anchors.fill: parent
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
//---IČ field---
AccessibleText {
id: icoLabel
visible: false
font.bold: true
text: qsTr("Subject ID (IČ)")
}
AccessibleTextField {
id: icoText
visible: false
height: inputItemHeight
maximumLength: 8
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter subject ID (IČ)")
width: parent.width
InputLineMenu {
id: icox
inputTextControl: icoText
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
icox.implicitWidth = computeMenuWidth(icox)
icox.open()
}
}
}
//---Date fields---
AccessibleText {
id: fromDateLabel
visible: false
font.bold: true
text: qsTr("From")
}
AccessibleTextField {
id: fromDateText
visible: false
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter date (YYYY-MM-DD)")
width: parent.width
enabled: false
InputLineMenu {
id: fromDateX
inputTextControl: fromDateText
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
fromDateX.implicitWidth = computeMenuWidth(fromDateX)
fromDateX.open()
}
}
}
AccessibleText {
id: toDateLabel
visible: false
font.bold: true
text: qsTr("To")
}
AccessibleTextField {
visible: false
id: toDateText
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter date (YYYY-MM-DD)")
width: parent.width
enabled: false
InputLineMenu {
id: toDateX
inputTextControl: toDateText
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
toDateX.implicitWidth = computeMenuWidth(toDateX)
toDateX.open()
}
}
}
//---Driver license field---
AccessibleText {
id: drvlicLabel
visible: false
font.bold: true
text: qsTr("Driver license ID")
}
AccessibleTextField {
id: drvlicText
visible: false
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter driver license ID without space")
width: parent.width
InputLineMenu {
id: drvlicx
inputTextControl: drvlicText
isPassword: false
}
onPressAndHold: {
if (settings.useExplicitClipboardOperations()) {
drvlicx.implicitWidth = computeMenuWidth(drvlicx)
drvlicx.open()
}
}
}
} // Column
Connections {
target: isds
onRunSendGovMessageSig: {
actionButton.enabled = false
if (gov.sendGovRequest(userName, gsInternId, govFormModel)) {
pageView.pop(StackView.Immediate)
} else {
actionButton.enabled = govFormModel.haveAllMandatory()
}
}
Connections {
target: isds
onRunSendGovMessageSig: {
actionButton.enabled = false
if (gov.sendGovRequest(userName, gsInternId, govFormModel)) {
pageView.pop(StackView.Immediate)
} else {
actionButton.enabled = govFormModel.haveAllMandatory()
}
} // Pane
ScrollIndicator.vertical: ScrollIndicator {}
} // Flickable
}
}
} // Item
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment