on bf461a2 help sign in
88 lines 2.4 kB history raw
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Renato Araujo Oliveira Filho <renato@canonical.com>
18 */
20import QtQuick 2.0
21import Ubuntu.Components 0.1
22import Ubuntu.Components.ListItems 0.1 as ListItem
23import Unity.Indicators 0.1 as Indicators
25Page {
26 id: pagePassword
28 property variant agent
29 property variant token
31 anchors.fill: parent
32 title: "Network Authentication"
34 Column {
35 anchors {
36 left: parent.left
37 right: parent.right
38 }
40 Indicators.SectionMenuItem {
41 text: "Authentication"
42 }
44 Indicators.FramedMenuItem {
45 implicitHeight: password.height + units.gu(1)
47 PasswordTextField {
48 id: password
49 anchors {
50 left: parent.left
51 right: parent.right
52 margins: units.gu(3)
53 verticalCenter: parent.verticalCenter
54 }
55 }
56 }
58 Indicators.FramedMenuItem {
59 Row {
60 anchors {
61 right: parent.right
62 verticalCenter: parent.verticalCenter
63 margins: units.gu(3)
64 }
66 spacing: units.gu(1)
68 Button {
69 text: "Cancel"
70 width: units.gu(10)
71 onClicked: {
72 agent.cancel(token);
73 pageStack.pop();
74 }
75 }
77 Button {
78 text: "OK"
79 width: units.gu(10)
80 onClicked: {
81 agent.authenticate(token, password.text);
82 pageStack.pop();
83 }
84 }
85 }
86 }
87 }