on 14dd930 help sign in
80 lines 2.1 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 label: "Authentication"
42 }
44 Indicators.TextMenuItem {
45 id: _password
47 password: true
48 }
50 Indicators.MenuItem {
51 Row {
52 anchors {
53 right: parent.right
54 verticalCenter: parent.verticalCenter
55 margins: units.gu(3)
56 }
58 spacing: units.gu(1)
60 Button {
61 text: "Cancel"
62 width: units.gu(10)
63 onClicked: {
64 agent.cancel(token);
65 pageStack.pop();
66 }
67 }
69 Button {
70 text: "Ok"
71 width: units.gu(10)
72 onClicked: {
73 agent.authenticate(token, _password.text);
74 pageStack.pop();
75 }
76 }
77 }
78 }
79 }