@@ -1,5 +1,5 @@
2− * Copyright (C) 2015 Canonical, Ltd.
2+ * Copyright (C) 2015-2016 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
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
5 * it under the terms of the GNU General Public License as published by
@@ -16,13 +16,12 @@
17import QtQuick 2.4
17import QtQuick 2.4
18import Ubuntu.Components 1.3
18import Ubuntu.Components 1.3
20import AccountsService 0.1
19import AccountsService 0.1
21import ".." as LocalComponents
20import ".." as LocalComponents
23LocalComponents.Page {
22LocalComponents.Page {
24 objectName: "accountPage"
23 objectName: "accountPage"
25− title: i18n.tr("Create Account")
24+ title: i18n.tr("User Details")
27 forwardButtonSourceComponent: forwardButton
26 forwardButtonSourceComponent: forwardButton
@@ -33,18 +32,17 @@ LocalComponents.Page {
33 QtObject {
32 QtObject {
36− readonly property bool validInput: nameInput.text !== "" &&
35+ readonly property bool validInput: true //nameInput.text !== ""
37− pass2Input.text.length > 7 && passInput.text === pass2Input.text
36+ // && pass2Input.text.length > 7 && passInput.text === pass2Input.text
39 function advance() {
38 function advance() {
40− root.password = passInput.text;
39+ //root.password = passInput.text;
41 AccountsService.realName = nameInput.text;
40 AccountsService.realName = nameInput.text;
42 pageStack.next();
41 pageStack.next();
46− Flickable
45+ Flickable {
48 id: column
46 id: column
49 clip: true
47 clip: true
50 flickableDirection: Flickable.VerticalFlick
48 flickableDirection: Flickable.VerticalFlick
@@ -63,7 +61,7 @@ LocalComponents.Page {
63 anchors.left: parent.left
61 anchors.left: parent.left
64 anchors.right: parent.right
62 anchors.right: parent.right
65 wrapMode: Text.Wrap
63 wrapMode: Text.Wrap
66− text: i18n.tr("Please enter your name and password to create your administrator account. You need this password to manage your device.")
64+ text: i18n.tr("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.")
67 color: textColor
65 color: textColor
68 fontSize: "small"
66 fontSize: "small"
69 font.weight: Font.Light
67 font.weight: Font.Light
@@ -90,84 +88,84 @@ LocalComponents.Page {
90 anchors.right: parent.right
88 anchors.right: parent.right
91 anchors.top: nameLabel.bottom
89 anchors.top: nameLabel.bottom
92 anchors.topMargin: units.gu(1)
90 anchors.topMargin: units.gu(1)
93− onActiveFocusChanged: {
91+// onActiveFocusChanged: {
94− if (activeFocus) {
92+// if (activeFocus) {
95− column.contentY = nameLabel.y
93+// column.contentY = nameLabel.y
98− inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
99− onAccepted: passInput.forceActiveFocus()
105− anchors.left: parent.left
106− anchors.right: parent.right
107− anchors.top: nameInput.bottom
108− anchors.topMargin: units.gu(2)
109− text: i18n.tr("Password")
111− font.weight: Font.Light
114− LocalComponents.WizardTextField {
116− objectName: "passInput"
117− anchors.left: parent.left
118− anchors.right: parent.right
119− anchors.top: passLabel.bottom
120− anchors.topMargin: units.gu(1)
121− echoMode: TextInput.Password
122− placeholderText: i18n.tr("Use letters and numbers")
123 inputMethodHints: Qt.ImhNoPredictiveText
96 inputMethodHints: Qt.ImhNoPredictiveText
124− onActiveFocusChanged: {
126− column.contentY = passLabel.y
129− onAccepted: pass2Input.forceActiveFocus()
97+ //onAccepted: passInput.forceActiveFocus()
103+// anchors.left: parent.left
104+// anchors.right: parent.right
105+// anchors.top: nameInput.bottom
106+// anchors.topMargin: units.gu(2)
107+// text: i18n.tr("Password")
109+// font.weight: Font.Light
112+// LocalComponents.WizardTextField {
114+// objectName: "passInput"
115+// anchors.left: parent.left
116+// anchors.right: parent.right
117+// anchors.top: passLabel.bottom
118+// anchors.topMargin: units.gu(1)
119+// echoMode: TextInput.Password
120+// placeholderText: i18n.tr("Use letters and numbers")
121+// inputMethodHints: Qt.ImhNoPredictiveText
122+// onActiveFocusChanged: {
123+// if (activeFocus) {
124+// column.contentY = passLabel.y
127+// onAccepted: pass2Input.forceActiveFocus()
132− // password meter
130+// // password meter
133− LocalComponents.PasswordMeter {
131+// LocalComponents.PasswordMeter {
134− id: passMeter
132+// id: passMeter
135− anchors.left: parent.left
133+// anchors.left: parent.left
136− anchors.right: parent.right
134+// anchors.right: parent.right
137− anchors.top: passInput.bottom
135+// anchors.top: passInput.bottom
138− anchors.topMargin: units.gu(1)
136+// anchors.topMargin: units.gu(1)
139− password: passInput.text
137+// password: passInput.text
142− // repeat password
140+// // repeat password
143− Label {
141+// Label {
144− id: pass2Label
142+// id: pass2Label
145− anchors.left: parent.left
143+// anchors.left: parent.left
146− anchors.right: parent.right
144+// anchors.right: parent.right
147− anchors.top: passMeter.bottom
145+// anchors.top: passMeter.bottom
148− anchors.topMargin: passInput.text !== "" ? units.gu(4) : units.gu(2)
146+// anchors.topMargin: passInput.text !== "" ? units.gu(4) : units.gu(2)
149− wrapMode: Text.Wrap
147+// wrapMode: Text.Wrap
150− text: i18n.tr("Repeat password")
148+// text: i18n.tr("Repeat password")
151− color: textColor
149+// color: textColor
152− font.weight: Font.Light
150+// font.weight: Font.Light
155− LocalComponents.WizardTextField {
153+// LocalComponents.WizardTextField {
156− id: pass2Input
154+// id: pass2Input
157− objectName: "pass2Input"
155+// objectName: "pass2Input"
158− anchors.left: parent.left
156+// anchors.left: parent.left
159− anchors.right: parent.right
157+// anchors.right: parent.right
160− anchors.top: pass2Label.bottom
158+// anchors.top: pass2Label.bottom
161− anchors.topMargin: units.gu(1)
159+// anchors.topMargin: units.gu(1)
162− echoMode: TextInput.Password
160+// echoMode: TextInput.Password
163− inputMethodHints: Qt.ImhNoPredictiveText
161+// inputMethodHints: Qt.ImhNoPredictiveText
164− onActiveFocusChanged: {
162+// onActiveFocusChanged: {
165− if (activeFocus) {
163+// if (activeFocus) {
166− column.contentY = pass2Label.y
164+// column.contentY = pass2Label.y
169− onAccepted: if (d.validInput) d.advance();
167+// onAccepted: if (d.validInput) d.advance();
173 Component {
171 Component {