## Script (Python) "script_portfolio ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind state=state ##bind subpath=traverse_subpath ##title=Portfolio stuff ## REQUEST=context.REQUEST action = REQUEST.get('action') if action=='save_woex': context.saveWorkExperience(REQUEST) state.set( portal_status_message="Work experience saved" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/workexp_edit') elif action=='remove_woex': context.removeWorkExperiences(REQUEST) state.set( portal_status_message="Work experience deleted" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/workexp_edit') elif action=='save_skills': context.saveSkills(REQUEST) state.set( portal_status_message="Personal skills and competences" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/skills_edit') elif action=='save_languages': context.saveLanguages(REQUEST) state.set( portal_status_message="Language saved" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/languages_edit') elif action=='remove_languages': context.removeLanguages(REQUEST) state.set( portal_status_message="Language deleted" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/languages_edit') elif action=='save_education': context.saveEducation(REQUEST) state.set( portal_status_message="Education and training saved" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/education_edit') elif action=='remove_education': context.removeEducation(REQUEST) state.set( portal_status_message="Education and training deleted" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/education_edit') elif action=='save_desired': context.saveDesired(REQUEST) state.set( portal_status_message="Desired employment / Occupational field saved" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/desired_edit') elif action=='save_additional': context.saveAdditional(REQUEST) state.set( portal_status_message="Additional information and annexes" ) return REQUEST.RESPONSE.redirect(context.absolute_url()+'/additional_edit') else: return state.set( portal_status_message="Something is wrong with request" )