コード例 #1
0
ファイル: change_pwd_dlg.py プロジェクト: Guillon88/stdm
 def acceptdlg(self):
     '''
     On user clicking the login button
     '''
     if self.validateInput():
         member = Membership()
         newPwd = self.txtConfirmPass.text()
         try:
             #Set new password
             member.setPassword(stdm.data.app_dbconn.User.UserName,newPwd)
             QMessageBox.information(self, QApplication.translate("ChangePasswordDialog","Change Password"), 
                                     QApplication.translate("ChangePasswordDialog","Your password has successfully been changed"))
             self.accept()
         except SecurityException as se:
             QMessageBox.critical(self, 
                                  QApplication.translate("ChangePasswordDialog","Password Error"), str(se))
             self.txtNewPass.selectAll()
コード例 #2
0
 def acceptdlg(self):
     '''
     On user clicking the login button
     '''
     if self.validateInput():
         member = Membership()
         newPwd = self.txtConfirmPass.text()
         try:
             #Set new password
             member.setPassword(stdm.data.app_dbconn.User.UserName, newPwd)
             QMessageBox.information(
                 self,
                 QApplication.translate("ChangePasswordDialog",
                                        "Change Password"),
                 QApplication.translate(
                     "ChangePasswordDialog",
                     "Your password has successfully been changed"))
             self.accept()
         except SecurityException as se:
             QMessageBox.critical(
                 self,
                 QApplication.translate("ChangePasswordDialog",
                                        "Password Error"), str(se))
             self.txtNewPass.selectAll()