diff --git a/htdocs/core/lib/public.lib.php b/htdocs/core/lib/public.lib.php index 0ce710517de..47a3f0e4209 100644 --- a/htdocs/core/lib/public.lib.php +++ b/htdocs/core/lib/public.lib.php @@ -52,7 +52,11 @@ function checkNbPostsForASpeceificIp($object, $nb_post_max) $sql = "SELECT COUNT(".(!empty($object->table_rowid) ? $object->table_rowid : 'rowid').") as nb_posts"; $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element; $sql .= " WHERE ip = '".$db->escape($object->ip)."'"; - $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + if (array_key_exists('date_creation', $object->fields)) { + $sql .= " AND date_creation > '".$db->idate($minmonthpost)."'"; + } else { + $sql .= " AND datec > '".$db->idate($minmonthpost)."'"; + } $resql = $db->query($sql); if ($resql) { $num = $db->num_rows($resql); diff --git a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql index 33b86a4d8df..ba603342da7 100644 --- a/htdocs/install/mysql/migration/20.0.0-21.0.0.sql +++ b/htdocs/install/mysql/migration/20.0.0-21.0.0.sql @@ -132,4 +132,7 @@ ALTER TABLE llx_societe ADD COLUMN ip varchar(250); ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN ip varchar(250); ALTER TABLE llx_socpeople ADD COLUMN ip varchar(250); +ALTER TABLE llx_recruitment_recruitmentcandidature MODIFY fk_user_creat integer NULL; + ALTER TABLE llx_ecm_files ADD COLUMN agenda_id integer; + diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql index 8016e813d5d..af174cc2568 100644 --- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature-recruitment.sql @@ -25,7 +25,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature( note_private text, date_creation datetime NOT NULL, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - fk_user_creat integer NOT NULL, + fk_user_creat integer, fk_user_modif integer, fk_user integer, -- Id of user created from the job application import_key varchar(14), diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang index 047455d5e2b..3d249271e2b 100644 --- a/htdocs/langs/en_US/recruitment.lang +++ b/htdocs/langs/en_US/recruitment.lang @@ -64,4 +64,7 @@ NoPositionOpen=No positions open at the moment ConfirmClose=Confirm cancellation ConfirmCloseAsk=Are you sure you want to cancel this recruitment candidature Recruitment=Recruitment +ApplyJobCandidature=Apply for this job +ErrorRecruitmmentCandidatureAlreadyExists= Recruitment candidature already exists with email %s +RecruitmentCandidatureSaved=Recruitement candidature successfully saved NoOpenJobOffer=No open job offers at the moment diff --git a/htdocs/public/recruitment/index.php b/htdocs/public/recruitment/index.php index af86d85034b..bf69fda17cc 100644 --- a/htdocs/public/recruitment/index.php +++ b/htdocs/public/recruitment/index.php @@ -174,6 +174,7 @@ if (getDolGlobalString('RECRUITMENT_IMAGE_PUBLIC_INTERFACE')) { $results = $object->fetchAll($sortorder, $sortfield, 0, 0, '(status:=:1)'); $now = dol_now(); +$params = array(); if (is_array($results)) { if (empty($results)) { @@ -187,6 +188,7 @@ if (is_array($results)) { foreach ($results as $job) { $object = $job; + $arrayofpostulatebutton = array(); print '
'.$text.' | |
'.$langs->trans("JobOfferToBeFilled", $mysoc->name); + $text .= ' | |
'.$langs->trans("JobOfferToBeFilled", $mysoc->name); $text .= ' - '.$mysoc->name.''; $text .= ' - '.dol_print_date($object->date_creation).''; $text .= ' | |
'.$object->label.' | |
'.$object->label.' | |
| '; +print ' | |
| ';
print ' ';
print ' '.$langs->trans("ThisIsInformationOnJobPosition").' : '."\n";
@@ -333,6 +381,38 @@ print "\n";
if ($action != 'dosubmit') {
if ($found && !$error) {
// We are in a management option and no error
+ print ' | |
| '.$langs->trans("Lastname").' | '; + print ''; + print ' |
| '.$langs->trans("Firstname").' | '; + print ''; + print ' |
| '.$langs->trans("Email").' | '; + print img_picto("", "email").''; + print ' |
| '.$langs->trans("Phone").' | '; + print img_picto("", "phone").''; + print ' |
| '.$langs->trans("DateOfBirth").' | '; + print $form->selectDate($birthday, 'birthday', 0, 0, 1, "", 1, 0); + print ' |
| '.$langs->trans("RequestedRemuneration").' | '; + print ''; + print ' |
| '.$langs->trans("Message").' | '; + print ''; + print ' |
| '; + print $form->buttonsSaveCancel('Submit', 'Cancel'); + print ' | |