Debug recruitment module
This commit is contained in:
parent
508683b9f0
commit
1cc7b41de3
@ -41,10 +41,12 @@ function recruitmentjobpositionPrepareHead($object)
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = dol_buildpath("/recruitment/recruitmentjobposition_candidature.php", 1).'?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Candidatures");
|
||||
$head[$h][2] = 'candidatures';
|
||||
$h++;
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 1) {
|
||||
$head[$h][0] = dol_buildpath("/recruitment/recruitmentjobposition_applications.php", 1).'?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Candidatures");
|
||||
$head[$h][2] = 'candidatures';
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (isset($object->fields['note_public']) || isset($object->fields['note_private']))
|
||||
{
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file recruitmentjobposition_candidature.php
|
||||
* \file recruitmentjobposition_applications.php
|
||||
* \ingroup recruitment
|
||||
* \brief Page to see/add candidatures
|
||||
* \brief Page to see/add applications of a job position
|
||||
*/
|
||||
|
||||
//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db
|
||||
@ -438,124 +438,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
print "</form>\n";
|
||||
}
|
||||
|
||||
|
||||
// Buttons for actions
|
||||
|
||||
if ($action != 'presend' && $action != 'editline') {
|
||||
print '<div class="tabsAction">'."\n";
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Send
|
||||
if (empty($user->socid)) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
|
||||
}
|
||||
|
||||
// Back to draft
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes">'.$langs->trans("SetToDraft").'</a>';
|
||||
}
|
||||
}
|
||||
|
||||
// Modify
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Modify').'</a>'."\n";
|
||||
}
|
||||
|
||||
// Validate
|
||||
if ($object->status == $object::STATUS_DRAFT)
|
||||
{
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes">'.$langs->trans("Validate").'</a>';
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
print '<a class="butActionRefused" href="" title="'.$langs->trans("ErrorAddAtLeastOneLineFirst").'">'.$langs->trans("Validate").'</a>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Clone
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&object=recruitmentjobposition">'.$langs->trans("ToClone").'</a>'."\n";
|
||||
}
|
||||
|
||||
/*
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_ENABLED)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=disable">'.$langs->trans("Disable").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=enable">'.$langs->trans("Enable").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
if ($permissiontoadd)
|
||||
{
|
||||
if ($object->status == $object::STATUS_VALIDATED)
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=close">'.$langs->trans("Cancel").'</a>'."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen">'.$langs->trans("Re-Open").'</a>'."\n";
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Delete (need delete permission, or if draft, just need create/modify permission)
|
||||
if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd))
|
||||
{
|
||||
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken().'">'.$langs->trans('Delete').'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Delete').'</a>'."\n";
|
||||
}
|
||||
}
|
||||
print '</div>'."\n";
|
||||
}
|
||||
|
||||
|
||||
// Select mail models is same action as presend
|
||||
if (GETPOST('modelselected')) {
|
||||
$action = 'presend';
|
||||
}
|
||||
|
||||
if ($action != 'presend')
|
||||
{
|
||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||
print '<a name="builddoc"></a>'; // ancre
|
||||
|
||||
|
||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||
|
||||
|
||||
print '</div></div></div>';
|
||||
}
|
||||
|
||||
//Select mail models is same action as presend
|
||||
if (GETPOST('modelselected')) $action = 'presend';
|
||||
|
||||
// Presend form
|
||||
$modelmail = 'recruitmentjobposition';
|
||||
$defaulttopic = 'InformationMessage';
|
||||
$diroutput = $conf->recruitment->dir_output;
|
||||
$trackid = 'recruitmentjobposition'.$object->id;
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||
print '<br>'.$langs->trans("FeatureNotYetAvailable");
|
||||
}
|
||||
|
||||
// End of page
|
||||
Loading…
Reference in New Issue
Block a user