Changeset 16540


Ignore:
Timestamp:
Aug 18, 2016, 5:51:53 PM (3 years ago)
Author:
dcorreia
Message:

Updated wizard pages messages.
Added PIN validation feature.

Location:
internals/2016/linuxloginsmartcardwizard/trunk/proto1
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/carduser.py

    r16537 r16540  
    11from PyQt5 import QtCore, QtGui, QtWidgets
    22from PyQt5.QtWidgets import QMessageBox
    3 import main, config, cardHelper
     3import main, config, cardHelper, fileHelper
    44
    55
     
    3535        self.readCardButton.setText("Read smartcard again")
    3636        self.readCardButton.hide()
    37         self.readCardButton.clicked.connect(self.buildCardSubjectInfo)
     37        self.readCardButton.clicked.connect(self.readCardButtonEvent)
    3838
    3939        self.layoutWidget3 = QtWidgets.QWidget(self)
     
    7171        self.cardErrorLabel.setText("Troubleshooting details")
    7272
    73         self.helpMessage = "This is the third screen of the wizard.\n\n" \
    74                            "The wizard needs you to select a username from the list \n" \
    75                            "and to insert the smartcard in the reader in order to \n" \
    76                            "finish the configuration process.\n\n" \
     73        self.helpMessage = "This is the third step of the wizard.\n\n" \
     74                           "In this step you need to insert the smartcard in the reader \n" \
     75                           "and select a username from the list in order to finish \n" \
     76                           "the smartcard login configuration process.\n\n" \
    7777                           "Please make sure the smartcard reader is connected to the \n" \
    7878                           "computer and that the smartcard is a Portuguese Citizen Card.\n"
     
    8686        self.registerField("username", self.userListBox, "currentText")
    8787        self.registerField("cardNumber", self.currentCardNumber, "text")
     88
     89    def readCardButtonEvent(self):
     90        self.goodCardLabel.hide()
     91        self.cardErrorLabel.setText("Reading card again...")
     92        self.cardErrorLabel.repaint()
     93        self.buildCardSubjectInfo()
    8894
    8995    def getCurrentBoxOption(self):
     
    141147    def checkPageValidation(self):
    142148        self.currentCardNumber.setText(cardHelper.getCardNumber())
    143         if main.configureUserMapping(self.getCurrentBoxOption(), self.cardSubjectInfo):
    144             return True
     149
     150        if config.checkUserCardCombo(self.getCurrentBoxOption(), self.cardSubjectInfo):
     151            fileHelper.executeCommand("python3 cardHelper.py verifyPin", open("/tmp/checkval", mode="w"))
     152            verifyRet = fileHelper.readFileToString("/tmp/checkval")
     153            fileHelper.deleteFile("/tmp/checkval")
     154            if "True" in verifyRet:
     155                main.configureUserMapping(self.getCurrentBoxOption(), self.cardSubjectInfo)
     156                return True
    145157        else:
    146158            self.messageBox.critical(self, "Title", "The chosen configuration already exists.\n\n" +
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/checksystem.py

    r16520 r16540  
    4242        self.timer = QtCore.QTimer()
    4343
    44         self.helpMessage = "This is the second screen of the wizard.\n\n" \
     44        self.helpMessage = "This is the second step of the wizard.\n\n" \
    4545                           "The wizard is making sure your system has all the tools needed \n" \
    4646                           "to setup the configuration of user login with a smartcard.\n\n" \
    47                            "If you get an error message, please contact support or use \n" \
    48                            "the instructions in the user manual.\n"
     47                           "If you get an error message, please contact technical support \n" \
     48                           "or try to follow the instructions in the user manual.\n"
    4949
    5050    def config(self):
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/final.py

    r16536 r16540  
    2121        self.setTitle("Add User Login")
    2222        self.setSubTitle("Conclusion")
    23         self.finalTextLabel.setText("Application finished.")
     23        self.finalTextLabel.setText("Wizard application finished.")
    2424
    25         self.helpMessage = "This is the final screen of the wizard.\n\n" \
     25        self.helpMessage = "This is the final step of the wizard.\n\n" \
    2626                           "The configuration process was successful.\n" \
    2727                           "Feel free to use your smartcard to login on user session.\n\n" \
  • internals/2016/linuxloginsmartcardwizard/trunk/proto1/welcome.py

    r16521 r16540  
    77        self.setObjectName("wizardPage1")
    88        self.layoutWidget = QtWidgets.QWidget(self)
    9         self.layoutWidget.setGeometry(QtCore.QRect(40, 40, 400, 130))
     9        self.layoutWidget.setGeometry(QtCore.QRect(40, 40, 450, 180))
    1010        self.layoutWidget.setObjectName("layoutWidget")
    1111        self.welcomeVLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
     
    2020        self.setTitle("Add User Login")
    2121        self.setSubTitle("Introduction to the wizard")
    22         self.welcomeTextLabel1.setText("This is the Welcome Screen for the application.\n\n\n"
    23                                        "Press Next to go to the next step.\n\n\n"
    24                                        "Press Cancel to close the application.")
     22        self.welcomeTextLabel1.setText("This is the first step of the wizard application.\n\n\n"
     23                                       "The following steps will help you add a new smartcard \n"
     24                                       "login configuration to your computer.\n\n\n"
     25                                       "Press Next to go to the next step.\n\n"
     26                                       "Press Help for more information.\n\n")
    2527
    2628        self.helpMessage = "This is the welcome screen of the wizard.\n\n" \
Note: See TracChangeset for help on using the changeset viewer.