# set the personal information fields from document data
self.set_personal_info (docdata)
+ # set the profile highlights
+ self.set_profile_highlights (docdata)
+
# set the educational qualifications
self.set_educational_qualifications (docdata)
unicode (self.email.text ().toUtf8 (), "utf-8"),
maritalstatus
)
+
+ # set the profile highlights
+ profile_highlights = unicode (self.profile.toPlainText ().toUtf8 ()).splitlines ()
+ docdata.set_profile (profile_highlights)
+
# get the list of educational qualifications from the treewidget
education = []
i = 0
self.email.setText ("")
self.areacode.setText ("")
self.unspecified.setChecked (True)
+ self.country.setText ("")
+
+ # function to set the profile highlights in the GUI from document data
+ def set_profile_highlights (self, docdata):
+ self.profile.setPlainText (u'\n'.join (docdata.data["profile"]))
+
+ # function to reset profile highlights data in GUI
+ def reset_profile_highlights (self):
+ self.profile.setPlainText ("")
# function to set personal information data in the GUI from document data
def set_personal_info (self, docdata):
self.title.setText ("")
self.reset_personal_info ()
+ self.reset_profile_highlights ()
self.reset_professional_history ()
self.reset_educational_qualifications ()
self.reset_career_objectives ()
PyQt4.QtGui.QMessageBox.critical (self, lang.ERROR_UPDATE, lang.ERROR_REQ_MISSING)
return
# if currently employed in that position, leaving date is to be disabled
- # and set to "current"
+ # and set to empty
if self.currentemployment.isChecked ():
- leavedatestr = "current"
+ leavedatestr = ""
else:
# if the leaving date is < join date
if self.leavedate.date () < self.joindate.date ():
PyQt4.QtGui.QMessageBox.critical (self, lang.ERROR_ADD, lang.ERROR_REQ_MISSING)
return
# if currently employed in that position, leaving date is to be disabled
- # and set to "current"
+ # and set to ""
if self.currentemployment.isChecked ():
- leavedatestr = "current"
+ leavedatestr = ""
else:
# if the leaving date is < join date
if self.leavedate.date () < self.joindate.date ():
selitem = selitems[0]
self.designation.setText (selitem.text (0))
self.joindate.setDate (PyQt4.QtCore.QDate.fromString (selitem.text(1), "dd MMM, yyyy"))
- if selitem.text (2) == "current":
+ if selitem.text (2) == "":
self.leavedate.setEnabled (False)
self.currentemployment.setChecked (True)
else: