@@ -0,0 +1,81 @@
1+/*
2+ * Copyright (C) 2014-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.3
18+import Ubuntu.Components 1.2
19+import Ubuntu.Web 0.2
20+import ".." as LocalComponents
21+
22+LocalComponents.Page {
23+ id: reportCheckPage
24+ objectName: "reportCheckPage"
25+
26+ title: webview.visible ? i18n.tr("Privacy Policy") : i18n.tr("Help Us Improve")
27+ forwardButtonSourceComponent: forwardButton
28+ customBack: true
29+ customTitle: webview.visible
30+
31+ onBackClicked: {
32+ if (webview.visible) {
33+ webview.visible = false;
34+ } else {
35+ pageStack.prev();
36+ }
37+ }
38+
39+ Column {
40+ id: column
41+ anchors {
42+ fill: content
43+ leftMargin: leftMargin
44+ rightMargin: rightMargin
45+ topMargin: customMargin
46+ }
47+
48+ LocalComponents.CheckableSetting {
49+ anchors {
50+ left: parent.left
51+ right: parent.right
52+ }
53+
54+ id: reportCheck
55+ objectName: "reportCheck"
56+ showDivider: false
57+ text: i18n.tr("Improve system performance by sending us crashes and error reports.") + "<br><br><a href='#'>" +
58+ i18n.tr("Privacy policy") + "</a>"
59+ checked: true
60+ onLinkActivated: {
61+ webview.url = "http://www.ubuntu.com/legal/terms-and-policies/privacy-policy";
62+ webview.visible = true;
63+ }
64+ }
65+ }
66+
67+ WebView {
68+ id: webview
69+ objectName: "webview"
70+ anchors.fill: content
71+ visible: false
72+ }
73+
74+ Component {
75+ id: forwardButton
76+ LocalComponents.StackButton {
77+ text: i18n.tr("Next")
78+ onClicked: pageStack.next();
79+ }
80+ }
81+}