Work on recruitment module
This commit is contained in:
parent
815269db9c
commit
b600478a5a
@ -167,6 +167,7 @@ if ($conf->adherent->enabled && $user->rights->adherent->lire) $element
|
|||||||
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementList['contract'] = $langs->trans('MailToSendContract');
|
if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementList['contract'] = $langs->trans('MailToSendContract');
|
||||||
if ($conf->projet->enabled) $elementList['project'] = $langs->trans('MailToProject');
|
if ($conf->projet->enabled) $elementList['project'] = $langs->trans('MailToProject');
|
||||||
if ($conf->ticket->enabled && $user->rights->ticket->read) $elementList['ticket_send'] = $langs->trans('MailToTicket');
|
if ($conf->ticket->enabled && $user->rights->ticket->read) $elementList['ticket_send'] = $langs->trans('MailToTicket');
|
||||||
|
if ($conf->recruitment->enabled && $user->rights->recruitment->recruitmentjobposition->read) $elementList['recruitmentcandidature_send'] = $langs->trans('RecruitmentCandidatures');
|
||||||
$elementList['user'] = $langs->trans('MailToUser');
|
$elementList['user'] = $langs->trans('MailToUser');
|
||||||
|
|
||||||
$parameters = array('elementList'=>$elementList);
|
$parameters = array('elementList'=>$elementList);
|
||||||
|
|||||||
@ -463,7 +463,7 @@ class FormMail extends Form
|
|||||||
} elseif (!empty($this->param['models']) && in_array($this->param['models'], array(
|
} elseif (!empty($this->param['models']) && in_array($this->param['models'], array(
|
||||||
'propal_send', 'order_send', 'facture_send',
|
'propal_send', 'order_send', 'facture_send',
|
||||||
'shipping_send', 'fichinter_send', 'supplier_proposal_send', 'order_supplier_send',
|
'shipping_send', 'fichinter_send', 'supplier_proposal_send', 'order_supplier_send',
|
||||||
'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'all'
|
'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'recruitmentcandidature_send', 'all'
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
// If list of template is empty
|
// If list of template is empty
|
||||||
@ -474,10 +474,11 @@ class FormMail extends Form
|
|||||||
$out .= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" disabled="disabled" id="modelselected">';
|
$out .= '<input class="button" type="submit" value="'.$langs->trans('Apply').'" name="modelselected" disabled="disabled" id="modelselected">';
|
||||||
$out .= ' ';
|
$out .= ' ';
|
||||||
$out .= '</div>';
|
$out .= '</div>';
|
||||||
|
} else {
|
||||||
|
$out .= '<!-- No template available for $this->param["models"] = '.$this->param['models'].' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$out .= '<table class="tableforemailform boxtablenotop" width="100%">'."\n";
|
$out .= '<table class="tableforemailform boxtablenotop" width="100%">'."\n";
|
||||||
|
|
||||||
// Substitution array/string
|
// Substitution array/string
|
||||||
@ -924,6 +925,8 @@ class FormMail extends Form
|
|||||||
$this->substit['__ONLINE_PAYMENT_URL__'] = '';
|
$this->substit['__ONLINE_PAYMENT_URL__'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->substit['__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__'] = '';
|
||||||
|
|
||||||
// Add lines substitution key from each line
|
// Add lines substitution key from each line
|
||||||
$lines = '';
|
$lines = '';
|
||||||
$defaultlines = $arraydefaultmessage->content_lines;
|
$defaultlines = $arraydefaultmessage->content_lines;
|
||||||
@ -946,6 +949,9 @@ class FormMail extends Form
|
|||||||
if (strpos($defaultmessage, '__ONLINE_PAYMENT_TEXT_AND_URL__') !== false && dol_textishtml($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'])) {
|
if (strpos($defaultmessage, '__ONLINE_PAYMENT_TEXT_AND_URL__') !== false && dol_textishtml($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'])) {
|
||||||
$atleastonecomponentishtml++;
|
$atleastonecomponentishtml++;
|
||||||
}
|
}
|
||||||
|
if (strpos($defaultmessage, '__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__') !== false && dol_textishtml($this->substit['__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__'])) {
|
||||||
|
$atleastonecomponentishtml++;
|
||||||
|
}
|
||||||
if (dol_textishtml($defaultmessage)) {
|
if (dol_textishtml($defaultmessage)) {
|
||||||
$atleastonecomponentishtml++;
|
$atleastonecomponentishtml++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6001,6 +6001,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
/*$substitutionarray['__MEMBER_NOTE_PUBLIC__'] = '__MEMBER_NOTE_PUBLIC__';
|
/*$substitutionarray['__MEMBER_NOTE_PUBLIC__'] = '__MEMBER_NOTE_PUBLIC__';
|
||||||
$substitutionarray['__MEMBER_NOTE_PRIVATE__'] = '__MEMBER_NOTE_PRIVATE__';*/
|
$substitutionarray['__MEMBER_NOTE_PRIVATE__'] = '__MEMBER_NOTE_PRIVATE__';*/
|
||||||
}
|
}
|
||||||
|
if (!empty($conf->recruitment->enabled))
|
||||||
|
{
|
||||||
|
$substitutionarray['__CANDIDATE_FULLNAME__'] = 'Candidate full name';
|
||||||
|
}
|
||||||
if (!empty($conf->projet->enabled))
|
if (!empty($conf->projet->enabled))
|
||||||
{
|
{
|
||||||
$substitutionarray['__PROJECT_ID__'] = '__PROJECT_ID__';
|
$substitutionarray['__PROJECT_ID__'] = '__PROJECT_ID__';
|
||||||
@ -6082,8 +6086,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__MEMBER_LAST_SUBSCRIPTION_DATE_END__'] = dol_print_date($object->last_subscription_date_end, 'dayrfc');
|
$substitutionarray['__MEMBER_LAST_SUBSCRIPTION_DATE_END__'] = dol_print_date($object->last_subscription_date_end, 'dayrfc');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($object) && $object->element == 'societe')
|
if (is_object($object) && $object->element == 'societe') {
|
||||||
{
|
|
||||||
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object) ? $object->id : '');
|
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object) ? $object->id : '');
|
||||||
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object) ? $object->name : '');
|
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object) ? $object->name : '');
|
||||||
$substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object) ? $object->name_alias : '');
|
$substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object) ? $object->name_alias : '');
|
||||||
@ -6106,8 +6109,7 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object) ? $object->tva_intra : '');
|
$substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object) ? $object->tva_intra : '');
|
||||||
$substitutionarray['__THIRDPARTY_NOTE_PUBLIC__'] = (is_object($object) ?dol_htmlentitiesbr($object->note_public) : '');
|
$substitutionarray['__THIRDPARTY_NOTE_PUBLIC__'] = (is_object($object) ?dol_htmlentitiesbr($object->note_public) : '');
|
||||||
$substitutionarray['__THIRDPARTY_NOTE_PRIVATE__'] = (is_object($object) ?dol_htmlentitiesbr($object->note_private) : '');
|
$substitutionarray['__THIRDPARTY_NOTE_PRIVATE__'] = (is_object($object) ?dol_htmlentitiesbr($object->note_private) : '');
|
||||||
} elseif (is_object($object->thirdparty) && $object->thirdparty->id > 0)
|
} elseif (is_object($object->thirdparty) && $object->thirdparty->id > 0) {
|
||||||
{
|
|
||||||
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object->thirdparty) ? $object->thirdparty->id : '');
|
$substitutionarray['__THIRDPARTY_ID__'] = (is_object($object->thirdparty) ? $object->thirdparty->id : '');
|
||||||
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object->thirdparty) ? $object->thirdparty->name : '');
|
$substitutionarray['__THIRDPARTY_NAME__'] = (is_object($object->thirdparty) ? $object->thirdparty->name : '');
|
||||||
$substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object->thirdparty) ? $object->thirdparty->name_alias : '');
|
$substitutionarray['__THIRDPARTY_NAME_ALIAS__'] = (is_object($object->thirdparty) ? $object->thirdparty->name_alias : '');
|
||||||
@ -6128,8 +6130,10 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
|||||||
$substitutionarray['__THIRDPARTY_IDPROF5__'] = (is_object($object->thirdparty) ? $object->thirdparty->idprof5 : '');
|
$substitutionarray['__THIRDPARTY_IDPROF5__'] = (is_object($object->thirdparty) ? $object->thirdparty->idprof5 : '');
|
||||||
$substitutionarray['__THIRDPARTY_IDPROF6__'] = (is_object($object->thirdparty) ? $object->thirdparty->idprof6 : '');
|
$substitutionarray['__THIRDPARTY_IDPROF6__'] = (is_object($object->thirdparty) ? $object->thirdparty->idprof6 : '');
|
||||||
$substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object->thirdparty) ? $object->thirdparty->tva_intra : '');
|
$substitutionarray['__THIRDPARTY_TVAINTRA__'] = (is_object($object->thirdparty) ? $object->thirdparty->tva_intra : '');
|
||||||
$substitutionarray['__THIRDPARTY_NOTE_PUBLIC__'] = (is_object($object->thirdparty) ?dol_htmlentitiesbr($object->thirdparty->note_public) : '');
|
$substitutionarray['__THIRDPARTY_NOTE_PUBLIC__'] = (is_object($object->thirdparty) ? dol_htmlentitiesbr($object->thirdparty->note_public) : '');
|
||||||
$substitutionarray['__THIRDPARTY_NOTE_PRIVATE__'] = (is_object($object->thirdparty) ?dol_htmlentitiesbr($object->thirdparty->note_private) : '');
|
$substitutionarray['__THIRDPARTY_NOTE_PRIVATE__'] = (is_object($object->thirdparty) ? dol_htmlentitiesbr($object->thirdparty->note_private) : '');
|
||||||
|
} elseif (is_object($object) && $object->element == 'recruitmentcandidature') {
|
||||||
|
$substitutionarray['__CANDIDATE_FULLNAME__'] = $object->getFullName($outputlangs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_object($object->project) && $object->project->id > 0)
|
if (is_object($object->project) && $object->project->id > 0)
|
||||||
|
|||||||
@ -154,21 +154,17 @@ if ($action == 'presend')
|
|||||||
|
|
||||||
// Fill list of recipient with email inside <>.
|
// Fill list of recipient with email inside <>.
|
||||||
$liste = array();
|
$liste = array();
|
||||||
if ($object->element == 'expensereport')
|
if ($object->element == 'expensereport') {
|
||||||
{
|
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
$fuser->fetch($object->fk_user_author);
|
$fuser->fetch($object->fk_user_author);
|
||||||
$liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">";
|
$liste['thirdparty'] = $fuser->getFullName($outputlangs)." <".$fuser->email.">";
|
||||||
} elseif ($object->element == 'societe')
|
} elseif ($object->element == 'societe') {
|
||||||
{
|
|
||||||
foreach ($object->thirdparty_and_contact_email_array(1) as $key => $value) {
|
foreach ($object->thirdparty_and_contact_email_array(1) as $key => $value) {
|
||||||
$liste[$key] = $value;
|
$liste[$key] = $value;
|
||||||
}
|
}
|
||||||
} elseif ($object->element == 'contact')
|
} elseif ($object->element == 'contact') {
|
||||||
{
|
|
||||||
$liste['contact'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
$liste['contact'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
||||||
} elseif ($object->element == 'user' || $object->element == 'member')
|
} elseif ($object->element == 'user' || $object->element == 'member') {
|
||||||
{
|
|
||||||
$liste['thirdparty'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
$liste['thirdparty'] = $object->getFullName($outputlangs)." <".$object->email.">";
|
||||||
} else {
|
} else {
|
||||||
if (is_object($object->thirdparty))
|
if (is_object($object->thirdparty))
|
||||||
|
|||||||
@ -30,3 +30,5 @@ INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_u
|
|||||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,<br><br>\n\n__(YourMembershipWasCanceled)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Password)__ : __MEMBER_PASSWORD__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,<br><br>\n\n__(ThisIsContentOfYourCard)__<br>\n__(ID)__ : __ID__<br>\n__(Civiliyty)__ : __MEMBER_CIVILITY__<br>\n__(Firstname)__ : __MEMBER_FIRSTNAME__<br>\n__(Lastname)__ : __MEMBER_LASTNAME__<br>\n__(Fullname)__ : __MEMBER_FULLNAME__<br>\n__(Company)__ : __MEMBER_COMPANY__<br>\n__(Address)__ : __MEMBER_ADDRESS__<br>\n__(Zip)__ : __MEMBER_ZIP__<br>\n__(Town)__ : __MEMBER_TOWN__<br>\n__(Country)__ : __MEMBER_COUNTRY__<br>\n__(Email)__ : __MEMBER_EMAIL__<br>\n__(Birthday)__ : __MEMBER_BIRTH__<br>\n__(Photo)__ : __MEMBER_PHOTO__<br>\n__(Login)__ : __MEMBER_LOGIN__<br>\n__(Password)__ : __MEMBER_PASSWORD__<br>\n__(Phone)__ : __MEMBER_PHONE__<br>\n__(PhonePerso)__ : __MEMBER_PHONEPRO__<br>\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
|
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswerMessage)__<br>__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
|
|||||||
@ -268,3 +268,5 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
|
|||||||
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_md tms timestamp;
|
ALTER TABLE llx_ecm_directories CHANGE COLUMN date_md tms timestamp;
|
||||||
ALTER TABLE llx_ecm_files CHANGE COLUMN date_md tms timestamp;
|
ALTER TABLE llx_ecm_files CHANGE COLUMN date_md tms timestamp;
|
||||||
|
|
||||||
|
INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,<br><br>\n\n__(YourCandidatureAnswer)__<br>\n<br><br>\n__(Sincerely)__<br>__USER_SIGNATURE__',null, 0);
|
||||||
|
|
||||||
|
|||||||
@ -64,4 +64,7 @@ ContractSigned=Contract signed
|
|||||||
RecruitmentCandidature=Candidature
|
RecruitmentCandidature=Candidature
|
||||||
JobPositions=Job positions
|
JobPositions=Job positions
|
||||||
RecruitmentCandidatures=Candidatures
|
RecruitmentCandidatures=Candidatures
|
||||||
InterviewToDo=Interview to do
|
InterviewToDo=Interview to do
|
||||||
|
AnswerCandidature=Candidature answer
|
||||||
|
YourCandidature=Your candidature
|
||||||
|
YourCandidatureAnswerMessage=Thanks you for your candidature.<br>...
|
||||||
|
|||||||
@ -464,7 +464,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
{
|
{
|
||||||
// Send
|
// Send
|
||||||
if (empty($user->socid)) {
|
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";
|
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&sendto='.urlencode($object->email).'#formmailbeforetitle">'.$langs->trans('SendMail').'</a>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back to draft
|
// Back to draft
|
||||||
@ -599,7 +599,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
if (GETPOST('modelselected')) $action = 'presend';
|
if (GETPOST('modelselected')) $action = 'presend';
|
||||||
|
|
||||||
// Presend form
|
// Presend form
|
||||||
$modelmail = 'recruitmentcandidature';
|
$modelmail = 'recruitmentcandidature_send';
|
||||||
$defaulttopic = 'InformationMessage';
|
$defaulttopic = 'InformationMessage';
|
||||||
$diroutput = $conf->recruitment->dir_output;
|
$diroutput = $conf->recruitment->dir_output;
|
||||||
$trackid = 'recruitmentcandidature'.$object->id;
|
$trackid = 'recruitmentcandidature'.$object->id;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user