~fredoust/sudoku-app/fix-bug-1200862

« back to all changes in this revision

Viewing changes to components/AddProfileDialog.qml

  • Committer: dinko.metalac at gmail
  • Date: 2013-07-12 12:01:00 UTC
  • mfrom: (74.1.3 sudoku-app)
  • Revision ID: dinko.metalac@gmail.com-20130712120100-3ters40v77spcvwg
Small fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
            spacing: units.gu(2)
19
19
 
20
20
            Rectangle{
21
 
                width: units.gu(25)
22
 
                height: units.gu(4)
 
21
                width: mainView.width/3*2
 
22
                height: mainView.height/18
23
23
                radius: 9
24
24
                anchors.horizontalCenter: parent.horizontalCenter
25
25
                TextField {
26
26
                    id:lastnameField
27
 
 
 
27
                    anchors.fill: parent
28
28
                    placeholderText: i18n.tr("Lastname")
29
29
 
30
30
                }
31
31
            }
32
32
            Rectangle{
33
 
                width: units.gu(25)
34
 
                height: units.gu(4)
 
33
                width: mainView.width/3*2
 
34
                height: mainView.height/18
35
35
                radius: 9
36
36
                anchors.horizontalCenter: parent.horizontalCenter
37
37
                TextField {
38
38
                    id:firstnameField
39
 
                    anchors.horizontalCenter: parent.horizontalCenter
 
39
                    anchors.fill: parent
40
40
                    placeholderText: i18n.tr("Firstname")
41
41
                }
42
42
            }
62
62
                            {
63
63
 
64
64
                                Settings.insertProfile(lastnameField.text, firstnameField.text);
65
 
                               PopupUtils.close(addProfileDialogue)
 
65
                                PopupUtils.close(addProfileDialogue)
66
66
                            }else{
67
67
                                mainView.showAlert(i18n.tr("Warning"), i18n.tr("User already exist."), okButton)
68
68
                            }
69
69
 
70
70
 
71
71
                        } else{
72
 
mainView.showAlert(i18n.tr("Warning"), i18n.tr("Lastname and firstname must not be empty."), okButton)
 
72
                            mainView.showAlert(i18n.tr("Warning"), i18n.tr("Lastname and firstname must not be empty."), okButton)
73
73
                        }
74
74
 
75
75
 
87
87
                    textColor: sudokuBlocksGrid.dialogButtonTextColor
88
88
                    border.color: "transparent"
89
89
                    onTriggered: {
90
 
                      PopupUtils.close(addProfileDialogue)
 
90
                        PopupUtils.close(addProfileDialogue)
91
91
                    }
92
92
                }
93
93
            }