2 * Copyright (C) 2015-2016 Canonical, Ltd.
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.
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.
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/>.
18 import Ubuntu.Components 1.3
19 import AccountsService 0.1
20 import ".." as LocalComponents
22 LocalComponents.Page {
23 objectName: "accountPage"
24 title: i18n.tr("Personalize Your Device")
26 forwardButtonSourceComponent: forwardButton
30 readonly property string validName: nameInput.text.trim()
38 leftMargin: parent.leftMargin
39 rightMargin: parent.rightMargin
40 topMargin: customMargin
46 anchors.left: parent.left
47 anchors.right: parent.right
48 text: i18n.tr("Preferred Name")
50 font.weight: Font.Light
53 LocalComponents.WizardTextField {
55 objectName: "nameInput"
56 anchors.left: parent.left
57 anchors.right: parent.right
58 inputMethodHints: Qt.ImhNoPredictiveText
64 LocalComponents.StackButton {
65 text: d.validName ? i18n.tr("Next") : i18n.tr("Skip")
68 AccountsService.realName = d.validName;