@@ -1,91 +0,0 @@
1−/*
2− * Copyright (C) 2015 Canonical, Ltd.
3− *
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
7− *
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
12− *
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
15− */
16−
17−import QtQuick 2.4
18−import Ubuntu.Components 1.3
19−import ".." as LocalComponents
20−
21−LocalComponents.Page {
22− objectName: "ubuntuAccountSignInPage"
23−
24− title: i18n.tr("Sign In")
25− customTitle: true
26− backButtonText: i18n.tr("Cancel")
27− forwardButtonSourceComponent: forwardButton
28−
29− Component.onCompleted: {
30− emailInput.forceActiveFocus()
31− }
32−
33− Item {
34− id: column
35− anchors.fill: content
36−
37− Label {
38− id: emailLabel
39− anchors.left: parent.left
40− anchors.right: parent.right
41− wrapMode: Text.Wrap
42− text: i18n.tr("Email:")
43− color: textColor
44− font.weight: Font.Light
45− }
46−
47− LocalComponents.WizardTextField {
48− id: emailInput
49− anchors.left: parent.left
50− anchors.right: parent.right
51− anchors.top: emailLabel.bottom
52− anchors.topMargin: units.gu(1)
53− inputMethodHints: Qt.ImhEmailCharactersOnly
54− validator: RegExpValidator {
55− regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
56− }
57− KeyNavigation.tab: passInput
58− }
59−
60− Label {
61− id: passLabel
62− anchors.left: parent.left
63− anchors.right: parent.right
64− anchors.top: emailInput.bottom
65− anchors.topMargin: units.gu(3)
66− wrapMode: Text.Wrap
67− text: i18n.tr("Password:")
68− color: textColor
69− font.weight: Font.Light
70− }
71−
72− LocalComponents.WizardTextField {
73− id: passInput
74− anchors.left: parent.left
75− anchors.right: parent.right
76− anchors.top: passLabel.bottom
77− anchors.topMargin: units.gu(1)
78− echoMode: TextInput.Password
79− KeyNavigation.tab: emailInput
80− }
81− }
82−
83− Component {
84− id: forwardButton
85− LocalComponents.StackButton {
86− enabled: emailInput.acceptableInput && passInput.text !== ""
87− text: i18n.tr("Sign In")
88− onClicked: pageStack.next() // TODO sign in against U1
89− }
90− }
91−}