@@ -22,10 +22,13 @@ import ".." as LocalComponents
23LocalComponents.Page {
23LocalComponents.Page {
24 objectName: "accountPage"
24 objectName: "accountPage"
25+ title: i18n.tr("Set Administrator Details")
26− title: i18n.tr("Create Device Account")
27+ forwardButtonSourceComponent: forwardButton
28− buttonBarVisible: false
29+ Component.onCompleted: {
30+ theme.palette.normal.backgroundText = "#cdcdcd";
@@ -35,40 +38,53 @@ LocalComponents.Page {
35 anchors.fill: content
38 anchors.fill: content
36 anchors.leftMargin: parent.leftMargin
39 anchors.leftMargin: parent.leftMargin
37 anchors.rightMargin: parent.rightMargin
40 anchors.rightMargin: parent.rightMargin
41+ anchors.topMargin: customMargin
46+// anchors.left: parent.left
47+// anchors.right: parent.right
48+// wrapMode: Text.Wrap
49+// text: i18n.tr("Email")
51+// font.weight: Font.Light
39− // email
54+// LocalComponents.WizardTextField {
56+// anchors.left: parent.left
57+// anchors.right: parent.right
58+// anchors.top: emailLabel.bottom
59+// anchors.topMargin: units.gu(1)
60+// inputMethodHints: Qt.ImhEmailCharactersOnly
61+// validator: RegExpValidator {
62+// regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
64+// KeyNavigation.tab: nameInput
41− id: emailLabel
69+ id: noticeLabel
42 anchors.left: parent.left
70 anchors.left: parent.left
43 anchors.right: parent.right
71 anchors.right: parent.right
44 wrapMode: Text.Wrap
72 wrapMode: Text.Wrap
45− text: i18n.tr("Email")
73+ text: i18n.tr("Please enter a password to create your user account. You need this password to administer your device.")
46 color: textColor
74 color: textColor
47 font.weight: Font.Light
76 font.weight: Font.Light
50− LocalComponents.WizardTextField {
80+ // username
52− anchors.left: parent.left
53− anchors.right: parent.right
54− anchors.top: emailLabel.bottom
55− anchors.topMargin: units.gu(1)
56− inputMethodHints: Qt.ImhEmailCharactersOnly
57− validator: RegExpValidator {
58− regExp: /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
60− KeyNavigation.tab: nameInput
65 id: nameLabel
82 id: nameLabel
66 anchors.left: parent.left
83 anchors.left: parent.left
67 anchors.right: parent.right
84 anchors.right: parent.right
68− anchors.top: emailInput.bottom
85+ anchors.top: noticeLabel.bottom
69− anchors.topMargin: units.gu(2)
86+ anchors.topMargin: units.gu(3)
71− text: i18n.tr("Your name")
87+ text: i18n.tr("User name")
72 color: textColor
88 color: textColor
73 font.weight: Font.Light
89 font.weight: Font.Light
@@ -89,7 +105,6 @@ LocalComponents.Page {
89 anchors.right: parent.right
105 anchors.right: parent.right
90 anchors.top: nameInput.bottom
106 anchors.top: nameInput.bottom
91 anchors.topMargin: units.gu(2)
107 anchors.topMargin: units.gu(2)
93 text: i18n.tr("Password")
108 text: i18n.tr("Password")
94 color: textColor
109 color: textColor
95 font.weight: Font.Light
110 font.weight: Font.Light
@@ -102,6 +117,7 @@ LocalComponents.Page {
102 anchors.top: passLabel.bottom
117 anchors.top: passLabel.bottom
103 anchors.topMargin: units.gu(1)
118 anchors.topMargin: units.gu(1)
104 echoMode: TextInput.Password
119 echoMode: TextInput.Password
120+ placeholderText: i18n.tr("Use a combination of letters and numbers.")
105 KeyNavigation.tab: pass2Input
121 KeyNavigation.tab: pass2Input
@@ -135,43 +151,22 @@ LocalComponents.Page {
135 anchors.top: pass2Label.bottom
151 anchors.top: pass2Label.bottom
136 anchors.topMargin: units.gu(1)
152 anchors.topMargin: units.gu(1)
137 echoMode: TextInput.Password
153 echoMode: TextInput.Password
138− KeyNavigation.tab: cancelButton
154+ KeyNavigation.tab: nameInput
145− top: pass2Input.bottom
147− right: parent.horizontalCenter
148− rightMargin: units.gu(1)
149− topMargin: units.gu(4)
151− text: i18n.tr("Cancel")
152− onClicked: pageStack.prev()
153− KeyNavigation.tab: okButton
156− Button {
158+ Component {
157− id: okButton
159+ id: forwardButton
158− anchors {
160+ LocalComponents.StackButton {
159− top: pass2Input.bottom
160− left: parent.horizontalCenter
162− leftMargin: units.gu(1)
163− topMargin: units.gu(4)
165− text: i18n.tr("Sign Up")
166− enabled: emailInput.acceptableInput && nameInput.text !== "" &&
161+ enabled: /*emailInput.acceptableInput && */nameInput.text !== "" &&
167 pass2Input.text.length > 7 && passInput.text === pass2Input.text
162 pass2Input.text.length > 7 && passInput.text === pass2Input.text
163+ text: i18n.tr("Next")
168 onClicked: {
164 onClicked: {
169 root.password = passInput.text;
165 root.password = passInput.text;
170 AccountsService.realName = nameInput.text;
166 AccountsService.realName = nameInput.text;
171− AccountsService.email = emailInput.text;
167+ //AccountsService.email = emailInput.text;
172− pageStack.next() // TODO sign up against U1 in Phase 2
168+ pageStack.next();
174− KeyNavigation.tab: emailInput