added an empty string check for the server name and user name change fields
This commit is contained in:
parent
6fd1ea26ee
commit
ed6351f8f1
2 changed files with 17 additions and 4 deletions
|
@ -260,6 +260,7 @@ PageType {
|
|||
|
||||
headerText: qsTr("User name")
|
||||
textFieldText: "New client"
|
||||
textField.maximumLength: 20
|
||||
|
||||
checkEmptyText: true
|
||||
}
|
||||
|
@ -470,7 +471,9 @@ PageType {
|
|||
imageSource: "qrc:/images/controls/share-2.svg"
|
||||
|
||||
onClicked: {
|
||||
ExportController.generateConfig(root.connectionTypesModel[exportTypeSelector.currentIndex].type)
|
||||
if (clientNameTextField.textFieldText !== "") {
|
||||
ExportController.generateConfig(root.connectionTypesModel[exportTypeSelector.currentIndex].type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -624,7 +627,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
headerText: qsTr("Client name")
|
||||
textFieldText: clientName
|
||||
textField.maximumLength: 30
|
||||
textField.maximumLength: 20
|
||||
checkEmptyText: true
|
||||
}
|
||||
|
||||
BasicButtonType {
|
||||
|
@ -633,6 +637,10 @@ PageType {
|
|||
text: qsTr("Save")
|
||||
|
||||
onClicked: {
|
||||
if (clientNameEditor.textFieldText === "") {
|
||||
return
|
||||
}
|
||||
|
||||
if (clientNameEditor.textFieldText !== clientName) {
|
||||
PageController.showBusyIndicator(true)
|
||||
ExportController.renameClient(index,
|
||||
|
@ -661,7 +669,7 @@ PageType {
|
|||
text: qsTr("Revoke")
|
||||
|
||||
onClicked: function() {
|
||||
questionDrawer.headerText = qsTr("Revoke the config for a user - ") + clientName + "?"
|
||||
questionDrawer.headerText = qsTr("Revoke the config for a user - %1?").arg(clientName)
|
||||
questionDrawer.descriptionText = qsTr("The user will no longer be able to connect to your server.")
|
||||
questionDrawer.yesButtonText = qsTr("Continue")
|
||||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue