/**
 *
 * @package    mahara
 * @subpackage artefact-resume
 * @author     Catalyst IT Ltd
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
 * @copyright  For copyright information on Mahara, please see the README file distributed with this software.
 *
 */
define('INTERNAL', true);
define('MENUITEM', 'content/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'interests');
require_once dirname(dirname(dirname(__FILE__))) . '/init.php';
define('TITLE', get_string('resume', 'artefact.resume'));
require_once 'pieforms/pieform.php';
safe_require('artefact', 'resume');
if (!PluginArtefactResume::is_active()) {
    throw new AccessDeniedException(get_string('plugindisableduser', 'mahara', get_string('resume', 'artefact.resume')));
}
$defaults = array('interest' => array('default' => '', 'fshelp' => true));
$form = pieform(simple_resumefield_form($defaults, 'artefact/resume/interests.php', array('editortitle' => get_string('interests', 'artefact.resume'))));
$smarty = smarty(array('artefact/resume/js/simpleresumefield.js'));
$smarty->assign('interestsform', $form);
$smarty->assign('INLINEJAVASCRIPT', '$j(simple_resumefield_init);');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('SUBPAGENAV', PluginArtefactResume::submenu_items());
$smarty->display('artefact:resume:interests.tpl');
Example #2
0
 */
define('INTERNAL', true);
define('MENUITEM', 'content/resume');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'resume');
define('SECTION_PAGE', 'index');
define('RESUME_SUBPAGE', 'index');
require_once dirname(dirname(dirname(__FILE__))) . '/init.php';
define('TITLE', get_string('resume', 'artefact.resume'));
require_once 'pieforms/pieform.php';
safe_require('artefact', 'resume');
if (!PluginArtefactResume::is_active()) {
    throw new AccessDeniedException(get_string('plugindisableduser', 'mahara', get_string('resume', 'artefact.resume')));
}
$defaults = array('coverletter' => array('default' => '', 'fshelp' => true));
$coverletterform = pieform(simple_resumefield_form($defaults, 'artefact/resume/index.php', array('editortitle' => get_string('coverletter', 'artefact.resume'))));
// load up all the artefacts this user already has....
$personalinformation = null;
try {
    $personalinformation = artefact_instance_from_type('personalinformation');
} catch (Exception $e) {
}
$personalinformationform = pieform(array('name' => 'personalinformation', 'plugintype' => 'artefact', 'pluginname' => 'resume', 'jsform' => true, 'method' => 'post', 'elements' => array('personalinfomation' => array('type' => 'fieldset', 'legend' => get_string('personalinformation', 'artefact.resume'), 'elements' => array('dateofbirth' => array('type' => 'calendar', 'caloptions' => array('showsTime' => false, 'ifFormat' => '%Y/%m/%d', 'dateFormat' => 'yy/mm/dd'), 'defaultvalue' => !empty($personalinformation) && null !== $personalinformation->get_composite('dateofbirth') ? $personalinformation->get_composite('dateofbirth') + 3600 : null, 'title' => get_string('dateofbirth', 'artefact.resume'), 'description' => get_string('dateofbirthformatguide')), 'placeofbirth' => array('type' => 'text', 'defaultvalue' => !empty($personalinformation) ? $personalinformation->get_composite('placeofbirth') : null, 'title' => get_string('placeofbirth', 'artefact.resume'), 'size' => 30), 'citizenship' => array('type' => 'text', 'defaultvalue' => !empty($personalinformation) ? $personalinformation->get_composite('citizenship') : null, 'title' => get_string('citizenship', 'artefact.resume'), 'size' => 30), 'visastatus' => array('type' => 'text', 'defaultvalue' => !empty($personalinformation) ? $personalinformation->get_composite('visastatus') : null, 'title' => get_string('visastatus', 'artefact.resume'), 'help' => true, 'size' => 30), 'gender' => array('type' => 'radio', 'defaultvalue' => !empty($personalinformation) ? $personalinformation->get_composite('gender') : null, 'options' => array('' => get_string('gendernotspecified', 'artefact.resume'), 'female' => get_string('female', 'artefact.resume'), 'male' => get_string('male', 'artefact.resume')), 'title' => get_string('gender', 'artefact.resume')), 'maritalstatus' => array('type' => 'text', 'defaultvalue' => !empty($personalinformation) ? $personalinformation->get_composite('maritalstatus') : null, 'title' => get_string('maritalstatus', 'artefact.resume'), 'size' => 30), 'save' => array('type' => 'submit', 'value' => get_string('save')))))));
$smarty = smarty(array('artefact/resume/js/simpleresumefield.js'));
$smarty->assign('coverletterform', $coverletterform);
$smarty->assign('personalinformationform', $personalinformationform);
$smarty->assign('INLINEJAVASCRIPT', '$j(simple_resumefield_init);');
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('SUBPAGENAV', PluginArtefactResume::submenu_items());
$smarty->display('artefact:resume:index.tpl');
function personalinformation_validate(Pieform $form, $values)