diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-08 11:54:45 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-09-08 11:54:45 +0200 |
commit | 6c7e79f7270500d00c526692c32cfc106a2feb07 (patch) | |
tree | 25de8ffc4de9a091c39449793823926c55e8a5bd /accounts | |
parent | 2adb0ca74ac2a3f993824ea86e9a3233dcacb9e5 (diff) | |
download | kube-6c7e79f7270500d00c526692c32cfc106a2feb07.tar.gz kube-6c7e79f7270500d00c526692c32cfc106a2feb07.zip |
Some basic input field validation.
Diffstat (limited to 'accounts')
4 files changed, 10 insertions, 2 deletions
diff --git a/accounts/gmail/package/contents/ui/GmailSettings.qml b/accounts/gmail/package/contents/ui/GmailSettings.qml index 0ee18bed..7f0c737b 100644 --- a/accounts/gmail/package/contents/ui/GmailSettings.qml +++ b/accounts/gmail/package/contents/ui/GmailSettings.qml | |||
@@ -28,6 +28,7 @@ Item { | |||
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Connect your GMail account" | 29 | property string heading: "Connect your GMail account" |
30 | property string subheadline: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." | 30 | property string subheadline: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube." |
31 | property bool valid: true | ||
31 | 32 | ||
32 | GmailAccount.GmailSettings { | 33 | GmailAccount.GmailSettings { |
33 | id: gmailSettings | 34 | id: gmailSettings |
diff --git a/accounts/imap/package/contents/ui/ImapAccountSettings.qml b/accounts/imap/package/contents/ui/ImapAccountSettings.qml index 26a41541..a0469719 100644 --- a/accounts/imap/package/contents/ui/ImapAccountSettings.qml +++ b/accounts/imap/package/contents/ui/ImapAccountSettings.qml | |||
@@ -28,6 +28,7 @@ Item { | |||
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Connect your IMAP account" | 29 | property string heading: "Connect your IMAP account" |
30 | property string subheadline: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube. For information about which SMTP, IMAP address, which authentification and port to be used, please contact your email provider." | 30 | property string subheadline: "To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube. For information about which SMTP, IMAP address, which authentification and port to be used, please contact your email provider." |
31 | property bool valid: true | ||
31 | 32 | ||
32 | ImapAccount.ImapSettings { | 33 | ImapAccount.ImapSettings { |
33 | id: imapSettings | 34 | id: imapSettings |
diff --git a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml index 017bf40a..be509641 100644 --- a/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml +++ b/accounts/kolabnow/package/contents/ui/KolabnowAccountSettings.qml | |||
@@ -27,6 +27,7 @@ Item { | |||
27 | property string accountId | 27 | property string accountId |
28 | property string heading: qsTr("Connect your KolabNOW account") | 28 | property string heading: qsTr("Connect your KolabNOW account") |
29 | property string subheadline: qsTr("To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube.") | 29 | property string subheadline: qsTr("To let Kube access your account, fill in email address, username, password and give the account a title that will be displayed inside Kube.") |
30 | property bool valid: accountField.acceptableInput && nameField.acceptableInput && emailField.acceptableInput && pwField.acceptableInput | ||
30 | 31 | ||
31 | KolabnowAccount.KolabnowSettings { | 32 | KolabnowAccount.KolabnowSettings { |
32 | id: kolabnowSettings | 33 | id: kolabnowSettings |
@@ -60,19 +61,22 @@ Item { | |||
60 | Layout.alignment: Qt.AlignRight | 61 | Layout.alignment: Qt.AlignRight |
61 | } | 62 | } |
62 | Kube.TextField { | 63 | Kube.TextField { |
64 | id: accountField | ||
63 | Layout.fillWidth: true | 65 | Layout.fillWidth: true |
64 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") | 66 | placeholderText: qsTr("E.g. \"Work\", \"Home\" that will be displayed in Kube as name") |
65 | text: kolabnowSettings.accountName | 67 | text: kolabnowSettings.accountName |
66 | onTextChanged: { | 68 | onTextChanged: { |
67 | kolabnowSettings.accountName = text | 69 | kolabnowSettings.accountName = text |
68 | } | 70 | } |
71 | validator: RegExpValidator { regExp: /.*\S.*/ } | ||
69 | } | 72 | } |
70 | 73 | ||
71 | Kube.Label { | 74 | Kube.Label { |
72 | text: qsTr("Name") | 75 | text: qsTr("Name") |
73 | Layout.alignment: Qt.AlignRight | 76 | Layout.alignment: Qt.AlignRight |
74 | } | 77 | } |
75 | Kube.TextField { | 78 | Kube.RequiredTextField { |
79 | id: nameField | ||
76 | Layout.fillWidth: true | 80 | Layout.fillWidth: true |
77 | placeholderText: qsTr("Your name") | 81 | placeholderText: qsTr("Your name") |
78 | text: kolabnowSettings.userName | 82 | text: kolabnowSettings.userName |
@@ -85,7 +89,8 @@ Item { | |||
85 | text: qsTr("Email address") | 89 | text: qsTr("Email address") |
86 | Layout.alignment: Qt.AlignRight | 90 | Layout.alignment: Qt.AlignRight |
87 | } | 91 | } |
88 | Kube.TextField { | 92 | Kube.RequiredTextField { |
93 | id: emailField | ||
89 | Layout.fillWidth: true | 94 | Layout.fillWidth: true |
90 | 95 | ||
91 | text: kolabnowSettings.emailAddress | 96 | text: kolabnowSettings.emailAddress |
diff --git a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml index 83f6d381..ba5bd766 100644 --- a/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml +++ b/accounts/maildir/package/contents/ui/MaildirAccountSettings.qml | |||
@@ -28,6 +28,7 @@ Item { | |||
28 | property string accountId | 28 | property string accountId |
29 | property string heading: "Add your Maildir archive" | 29 | property string heading: "Add your Maildir archive" |
30 | property string subheadline: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube." | 30 | property string subheadline: "To let Kube access your maildir archive, add the path to your archive and give the account a title that will be displayed inside Kube." |
31 | property bool valid: true | ||
31 | 32 | ||
32 | MaildirAccount.MaildirSettings { | 33 | MaildirAccount.MaildirSettings { |
33 | id: maildirSettings | 34 | id: maildirSettings |