@@ -19,7 +19,6 @@ import Ubuntu.Components 1.3
19import Ubuntu.Web 0.2
19import Ubuntu.Web 0.2
20import AccountsService 0.1
20import AccountsService 0.1
21import ".." as LocalComponents
21import ".." as LocalComponents
22−import "../../Components"
24LocalComponents.Page {
23LocalComponents.Page {
25 objectName: "accountPage"
24 objectName: "accountPage"
@@ -34,13 +33,12 @@ LocalComponents.Page {
34 QtObject {
33 QtObject {
37− readonly property bool validInput: /*emailInput.acceptableInput && */nameInput.text !== "" &&
36+ readonly property bool validInput: nameInput.text !== "" &&
38 pass2Input.text.length > 7 && passInput.text === pass2Input.text
37 pass2Input.text.length > 7 && passInput.text === pass2Input.text
40 function advance() {
39 function advance() {
41 root.password = passInput.text;
40 root.password = passInput.text;
42 AccountsService.realName = nameInput.text;
41 AccountsService.realName = nameInput.text;
43− //AccountsService.email = emailInput.text;
44 pageStack.next();
42 pageStack.next();
@@ -54,35 +52,8 @@ LocalComponents.Page {
54 anchors.leftMargin: parent.leftMargin
52 anchors.leftMargin: parent.leftMargin
55 anchors.rightMargin: parent.rightMargin
53 anchors.rightMargin: parent.rightMargin
56 anchors.topMargin: customMargin
54 anchors.topMargin: customMargin
57−
55+ height: contentHeight - buttonBarHeight - (Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0) - titleRectHeight
58− ListViewOSKScroller {
56+ contentHeight: contentItem.childrenRect.height
66−// anchors.left: parent.left
67−// anchors.right: parent.right
68−// wrapMode: Text.Wrap
69−// text: i18n.tr("Email")
71−// font.weight: Font.Light
74−// LocalComponents.WizardTextField {
76−// anchors.left: parent.left
77−// anchors.right: parent.right
78−// anchors.top: emailLabel.bottom
79−// anchors.topMargin: units.gu(1)
80−// inputMethodHints: Qt.ImhEmailCharactersOnly
81−// validator: RegExpValidator {
82−// regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
84−// KeyNavigation.tab: nameInput
@@ -116,9 +87,13 @@ LocalComponents.Page {
116 anchors.right: parent.right
87 anchors.right: parent.right
117 anchors.top: nameLabel.bottom
88 anchors.top: nameLabel.bottom
118 anchors.topMargin: units.gu(1)
89 anchors.topMargin: units.gu(1)
119− KeyNavigation.tab: passInput
120− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(nameInput)
90+ onActiveFocusChanged: {
92+ print("Name got focused", focus);
93+ column.contentY = nameLabel.y
121− inputMethodHints: Qt.ImhNoAutoUppercase
96+ inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
122 onAccepted: passInput.forceActiveFocus()
97 onAccepted: passInput.forceActiveFocus()
@@ -142,8 +117,13 @@ LocalComponents.Page {
142 anchors.topMargin: units.gu(1)
117 anchors.topMargin: units.gu(1)
143 echoMode: TextInput.Password
118 echoMode: TextInput.Password
144 placeholderText: i18n.tr("Use a combination of letters and numbers")
119 placeholderText: i18n.tr("Use a combination of letters and numbers")
145− KeyNavigation.tab: pass2Input
120+ inputMethodHints: Qt.ImhNoPredictiveText
146− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(passInput)
121+ onActiveFocusChanged: {
123+ print("Password got focused", focus);
124+ column.contentY = passLabel.y
147 onAccepted: pass2Input.forceActiveFocus()
127 onAccepted: pass2Input.forceActiveFocus()
@@ -177,8 +157,13 @@ LocalComponents.Page {
177 anchors.top: pass2Label.bottom
157 anchors.top: pass2Label.bottom
178 anchors.topMargin: units.gu(1)
158 anchors.topMargin: units.gu(1)
179 echoMode: TextInput.Password
159 echoMode: TextInput.Password
180− KeyNavigation.tab: nameInput
160+ inputMethodHints: Qt.ImhNoPredictiveText
181− onActiveFocusChanged: if (activeFocus) oskScroller.setMakeSureVisibleItem(pass2Input)
161+ onActiveFocusChanged: {
163+ print("Password 2 got focused", focus);
164+ column.contentY = pass2Label.y
182 onAccepted: if (d.validInput) d.advance();
167 onAccepted: if (d.validInput) d.advance();