on xenial help sign in
implement separate Ok/Cancel buttons
9699834Lukáš Tinkl
qml/Wizard/Pages/60-uaccount-signup.qml+25−63
@@ -23,19 +23,9 @@ import ".." as LocalComponents
23LocalComponents.Page {
23LocalComponents.Page {
24 objectName: "ubuntuAccountSignUpPage"
24 objectName: "ubuntuAccountSignUpPage"
25
25
26− title: webview.visible ? i18n.tr("Terms And Conditions") : i18n.tr("Create Account")
26+ title: i18n.tr("Create Account")
27 customTitle: true
27 customTitle: true
28− customBack: true
28+ buttonBarVisible: false
29− backButtonText: webview.visible ? i18n.tr("Back") : i18n.tr("Cancel")
30− forwardButtonSourceComponent: !webview.visible ? forwardButton : null
31−
32− onBackClicked: {
33− if (webview.visible) {
34− webview.visible = false;
35− } else {
36− pageStack.prev();
37− }
38− }
39
29
40 Flickable
30 Flickable
41 {
31 {
@@ -148,60 +138,32 @@ LocalComponents.Page {
148 KeyNavigation.tab: emailInput
138 KeyNavigation.tab: emailInput
149 }
139 }
150
140
151−// LocalComponents.CheckableSetting {
141+ // buttons
152−// id: encryptCheck
142+ Button {
153−// objectName: "encryptCheck"
143+ id: cancelButton
154−// showDivider: false
155−// anchors.left: parent.left
156−// anchors.right: parent.right
144+ anchors {
157−// anchors.top: pass2Input.bottom
145+ top: pass2Input.bottom
158−// anchors.topMargin: units.gu(2)
159−// text: i18n.tr("Encrypt my content")
160−// KeyNavigation.tab: emailInput
161−// }
162−
163− // LocalComponents.CheckableSetting {
164− // id: optoutCheck
165− // objectName: "optoutCheck"
166− // showDivider: false
167− // anchors.left: parent.left
146+ left: parent.left
168− // anchors.right: parent.right
147+ right: parent.horizontalCenter
169− // anchors.top: encryptCheck.bottom
148+ rightMargin: units.gu(1)
170− // anchors.topMargin: units.gu(2)
149+ topMargin: units.gu(4)
171− // text: i18n.tr("Opt out of cloud account (not recommended)")
150+ }
172− // KeyNavigation.tab: termsCheck
151+ text: i18n.tr("Cancel")
173− // }
152+ onClicked: pageStack.prev()
174−
175− // LocalComponents.CheckableSetting {
176− // id: termsCheck
177− // objectName: "termsCheck"
178− // showDivider: false
179− // anchors.left: parent.left
180− // anchors.right: parent.right
181− // anchors.top: encryptCheck.bottom
182− // anchors.topMargin: units.gu(1)
183− // text: i18n.tr("I have read and accept the Ubuntu account <a href='#'>terms of service</a>")
184− // onLinkActivated: {
185− // webview.visible = true;
186− // webview.url = "https://login.ubuntu.com/terms/";
187− // }
188− // KeyNavigation.tab: emailInput
189− // }
190− }
191−
192− WebView {
193− id: webview
194− objectName: "webview"
195− anchors.fill: content
196− visible: false
197− }
153+ }
198
154
199− Component {
155+ Button {
200− id: forwardButton
156+ id: okButton
201− LocalComponents.StackButton {
157+ anchors {
158+ top: pass2Input.bottom
159+ left: parent.horizontalCenter
160+ right: parent.right
161+ leftMargin: units.gu(1)
162+ topMargin: units.gu(4)
163+ }
164+ text: i18n.tr("Sign Up")
202 enabled: emailInput.acceptableInput && nameInput.text !== "" &&
165 enabled: emailInput.acceptableInput && nameInput.text !== "" &&
203 pass2Input.text.length > 7 && passInput.text === pass2Input.text
166 pass2Input.text.length > 7 && passInput.text === pass2Input.text
204− text: i18n.tr("Sign Up")
205 onClicked: {
167 onClicked: {
206 root.password = passInput.text;
168 root.password = passInput.text;
207 AccountsService.realName = nameInput.text;
169 AccountsService.realName = nameInput.text;