dolibarr 21.0.0-alpha
recruitmentjobposition_card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require_once '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
29require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
30require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
31require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
32require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
33require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment_recruitmentjobposition.lib.php';
34
35// Load translation files required by the page
36$langs->loadLangs(array("recruitment", "other"));
37
38// Get parameters
39$id = GETPOSTINT('id');
40$ref = GETPOST('ref', 'alpha');
41$action = GETPOST('action', 'aZ09');
42$confirm = GETPOST('confirm', 'alpha');
43$cancel = GETPOST('cancel', 'aZ09');
44$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'recruitmentjobpositioncard'; // To manage different context of search
45$backtopage = GETPOST('backtopage', 'alpha');
46$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
47$lineid = GETPOSTINT('lineid');
48
49// Initialize a technical objects
51$extrafields = new ExtraFields($db);
52$diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
53$hookmanager->initHooks(array('recruitmentjobpositioncard', 'globalcard')); // Note that conf->hooks_modules contains array
54
55// Fetch optionals attributes and labels
56$extrafields->fetch_name_optionals_label($object->table_element);
57
58$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
59
60// Initialize array of search criteria
61$search_all = GETPOST("search_all", 'alpha');
62$search = array();
63foreach ($object->fields as $key => $val) {
64 if (GETPOST('search_'.$key, 'alpha')) {
65 $search[$key] = GETPOST('search_'.$key, 'alpha');
66 }
67}
68
69if (empty($action) && empty($id) && empty($ref)) {
70 $action = 'create';
71}
72
73// Load object
74include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
75
76
77$permissiontoread = $user->hasRight('recruitment', 'recruitmentjobposition', 'read');
78$permissiontoadd = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
79$permissiontodelete = $user->hasRight('recruitment', 'recruitmentjobposition', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
80$permissionnote = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_setnotes.inc.php
81$permissiondellink = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // Used by the include of actions_dellink.inc.php
82$upload_dir = $conf->recruitment->multidir_output[isset($object->entity) ? $object->entity : 1];
83
84$usercanclose = $permissiontoadd;
85
86// Security check - Protection if external user
87//if ($user->socid > 0) accessforbidden();
88//if ($user->socid > 0) $socid = $user->socid;
89$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
90$result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruitmentjobposition', 'recruitmentjobposition', '', 'rowid', $isdraft);
91
92
93/*
94 * Actions
95 */
96
97$parameters = array();
98$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
99if ($reshook < 0) {
100 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
101}
102
103if (empty($reshook)) {
104 $error = 0;
105
106 $backurlforlist = dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1);
107
108 if (empty($backtopage) || ($cancel && empty($id))) {
109 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
110 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
111 $backtopage = $backurlforlist;
112 } else {
113 $backtopage = dol_buildpath('/recruitment/recruitmentjobposition_card.php', 1).'?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
114 }
115 }
116 }
117 $triggermodname = 'RECRUITMENT_RECRUITMENTJOBPOSITION_MODIFY'; // Name of trigger action code to execute when we modify record
118
119 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
120 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
121
122 // Actions when linking object each other
123 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
124
125 // Actions when printing a doc from card
126 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
127
128 // Action to move up and down lines of object
129 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
130
131 // Action to build doc
132 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
133
134 if ($action == 'set_thirdparty' && $permissiontoadd) {
135 $object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
136 }
137 if ($action == 'classin' && $permissiontoadd) {
138 $object->setProject(GETPOSTINT('projectid'));
139 }
140 if ($action == 'confirm_closeas' && $usercanclose && !GETPOST('cancel', 'alpha')) {
141 if (!(GETPOSTINT('status') > 0)) {
142 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CloseAs")), null, 'errors');
143 $action = 'closeas';
144 } else {
145 // prevent browser refresh from closing proposal several times
146 if ($object->status == $object::STATUS_VALIDATED) {
147 $db->begin();
148
149 $result = $object->cloture($user, GETPOSTINT('status'), GETPOSTINT('note_private'));
150 if ($result < 0) {
151 setEventMessages($object->error, $object->errors, 'errors');
152 $error++;
153 }
154
155 if (!$error) {
156 $db->commit();
157 } else {
158 $db->rollback();
159 }
160 }
161 }
162 }
163
164 // Actions to send emails
165 $triggersendname = 'RECRUITMENTJOBPOSITION_SENTBYMAIL';
166 $autocopy = 'MAIN_MAIL_AUTOCOPY_RECRUITMENTJOBPOSITION_TO';
167 $trackid = 'recruitmentjobposition'.$object->id;
168 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
169}
170
171
172
173
174/*
175 * View
176 */
177
178$form = new Form($db);
179$formfile = new FormFile($db);
180$formproject = new FormProjets($db);
181
182$title = $object->ref." - ".$langs->trans('Card');
183$help_url = '';
184llxHeader('', $title, $help_url);
185
186// Part to create
187if ($action == 'create') {
188 print load_fiche_titre($langs->trans("NewPositionToBeFilled"), '', 'object_'.$object->picto);
189
190 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
191 print '<input type="hidden" name="token" value="'.newToken().'">';
192 print '<input type="hidden" name="action" value="add">';
193 if ($backtopage) {
194 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
195 }
196 if ($backtopageforcancel) {
197 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
198 }
199
200 // Set some default values
201 if (!GETPOSTISSET('fk_user_recruiter')) {
202 $_POST['fk_user_recruiter'] = $user->id;
203 }
204
205 print dol_get_fiche_head(array(), '');
206
207 print '<table class="border centpercent tableforfieldcreate">'."\n";
208
209 // Common attributes
210 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
211
212 // Other attributes
213 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
214
215 print '</table>'."\n";
216
217 print dol_get_fiche_end();
218
219 print $form->buttonsSaveCancel("Create");
220
221 print '</form>';
222
223 //dol_set_focus('input[name="ref"]');
224}
225
226// Part to edit record
227if (($id || $ref) && $action == 'edit') {
228 print load_fiche_titre($langs->trans("PositionToBeFilled"), '', 'object_'.$object->picto);
229
230 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
231 print '<input type="hidden" name="token" value="'.newToken().'">';
232 print '<input type="hidden" name="action" value="update">';
233 print '<input type="hidden" name="id" value="'.$object->id.'">';
234 if ($backtopage) {
235 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
236 }
237 if ($backtopageforcancel) {
238 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
239 }
240
241 print dol_get_fiche_head();
242
243 print '<table class="border centpercent tableforfieldedit">'."\n";
244
245 // Common attributes
246 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
247
248 // Other attributes
249 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
250
251 print '</table>';
252
253 print dol_get_fiche_end();
254
255 print $form->buttonsSaveCancel();
256
257 print '</form>';
258}
259
260// Part to show record
261if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
262 $head = recruitmentjobpositionPrepareHead($object);
263 print dol_get_fiche_head($head, 'card', $langs->trans("RecruitmentJobPosition"), -1, $object->picto);
264
265 $formconfirm = '';
266
267 // Confirmation to delete
268 if ($action == 'delete') {
269 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteRecruitmentJobPosition'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
270 }
271 // Confirmation to delete line
272 if ($action == 'deleteline') {
273 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1);
274 }
275 // Clone confirmation
276 if ($action == 'clone') {
277 // Create an array for form
278 $formquestion = array();
279 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
280 }
281 if ($action == 'closeas') {
282 $text = "";
283 //Form to close proposal (signed or not)
284 $formquestion = array(
285 array('type' => 'select', 'name' => 'status', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array(3 => $object->LibStatut($object::STATUS_RECRUITED), 9 => $object->LibStatut($object::STATUS_CANCELED))),
286 array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => '') // Field to complete private note (not replace)
287 );
288
289 /*if (isModEnabled('notification'))
290 {
291 require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
292 $notify = new Notify($db);
293 $formquestion = array_merge($formquestion, array(
294 array('type' => 'onecolumn', 'value' => $notify->confirmMessage('RECRUITMENTJOBPOSITION_CLOSE_SIGNED', $object->socid, $object)),
295 ));
296 }*/
297
298 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Close'), $text, 'confirm_closeas', $formquestion, '', 1, 250);
299 }
300
301 // Call Hook formConfirm
302 $parameters = array('formConfirm' => $formconfirm, 'lineid' => $lineid);
303 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
304 if (empty($reshook)) {
305 $formconfirm .= $hookmanager->resPrint;
306 } elseif ($reshook > 0) {
307 $formconfirm = $hookmanager->resPrint;
308 }
309
310 // Print form confirm
311 print $formconfirm;
312
313
314 // Object card
315 // ------------------------------------------------------------
316 $linkback = '<a href="'.dol_buildpath('/recruitment/recruitmentjobposition_list.php', 1).'?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
317
318 $morehtmlref = '<div class="refidno">';
319 /*
320 // Ref customer
321 $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1);
322 $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1);
323 // Thirdparty
324 $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : '');
325 */
326 // Project
327 if (isModEnabled('project')) {
328 $langs->load("projects");
329 $morehtmlref .= $langs->trans('Project').' ';
330 if ($permissiontoadd) {
331 if ($action != 'classify') {
332 $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a>';
333 }
334 $morehtmlref .= ' : ';
335 if ($action == 'classify') {
336 //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
337 $morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
338 $morehtmlref .= '<input type="hidden" name="action" value="classin">';
339 $morehtmlref .= '<input type="hidden" name="token" value="'.newToken().'">';
340 $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1);
341 $morehtmlref .= '<input type="submit" class="button valignmiddle" value="'.$langs->trans("Modify").'">';
342 $morehtmlref .= '</form>';
343 } else {
344 $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, !empty($object->socid) ? $object->socid : 0, $object->fk_project, 'none', 0, 0, 0, 1, '', 'maxwidth300');
345 }
346 } else {
347 if (!empty($object->fk_project)) {
348 $proj = new Project($db);
349 $proj->fetch($object->fk_project);
350 $morehtmlref .= ': '.$proj->getNomUrl();
351 } else {
352 $morehtmlref .= '';
353 }
354 }
355 }
356 $morehtmlref .= '</div>';
357
358
359 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
360
361
362 print '<div class="fichecenter">';
363 print '<div class="fichehalfleft">';
364 print '<div class="underbanner clearboth"></div>';
365 print '<table class="border centpercent tableforfield">'."\n";
366
367 // Common attributes
368 $keyforbreak = 'description'; // We change column just after this field
369 unset($object->fields['fk_project']); // Hide field already shown in banner
370 //unset($object->fields['fk_soc']); // Hide field already shown in banner
371 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
372
373 // Other attributes. Fields from hook formObjectOptions and Extrafields.
374 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
375
376 print '</table>';
377 print '</div>';
378 print '</div>';
379
380 print '<div class="clearboth"></div>';
381
382 print dol_get_fiche_end();
383
384
385 // Buttons for actions
386
387 if ($action != 'presend' && $action != 'editline') {
388 print '<div class="tabsAction">'."\n";
389 $parameters = array();
390 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
391 if ($reshook < 0) {
392 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
393 }
394
395 if (empty($reshook)) {
396 // Send
397 if (empty($user->socid)) {
398 print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
399 }
400
401 // Back to draft
402 if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_RECRUITED) {
403 if ($permissiontoadd) {
404 print dolGetButtonAction('', $langs->trans('SetToDraft'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
405 }
406 }
407
408 // Modify
409 print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
410
411 // Validate
412 if ($object->status == $object::STATUS_DRAFT) {
413 if ($permissiontoadd) {
414 if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
415 print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=confirm_validate&confirm=yes&token='.newToken(), '', $permissiontoadd);
416 } else {
417 $langs->load("errors");
418 print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0);
419 }
420 }
421 }
422
423 // Close as recruited/canceled
424 if ($object->status == $object::STATUS_VALIDATED) {
425 if ($usercanclose) {
426 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"';
427 print '>'.$langs->trans('Close').'</a>';
428 } else {
429 print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans('Close').'</a>';
430 }
431 }
432
433 // Clone
434 if ($permissiontoadd) {
435 print dolGetButtonAction($langs->trans("ToClone"), '', 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : "").'&action=clone&object=recruitmentjobposition', 'clone', $permissiontoadd);
436 }
437
438 /*
439 if ($permissiontoadd) {
440 if ($object->status == $object::STATUS_ENABLED) {
441 print dolGetButtonAction('', $langs->trans('Disable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=disable&token='.newToken(), '', $permissiontoadd);
442 } else {
443 print dolGetButtonAction('', $langs->trans('Enable'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=enable&token='.newToken(), '', $permissiontoadd);
444 }
445 }
446 }*/
447 if ($permissiontoadd) {
448 if ($object->status == $object::STATUS_CANCELED) {
449 print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_reopen&confirm=yes&token='.newToken().'">'.$langs->trans("Re-Open").'</a>'."\n";
450 }
451 }
452
453 // Delete
454 $params = array();
455 print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $permissiontodelete, $params);
456 }
457 print '</div>'."\n";
458 }
459
460
461 // Select mail models is same action as presend
462 if (GETPOST('modelselected')) {
463 $action = 'presend';
464 }
465
466 if ($action != 'presend') {
467 print '<div class="fichecenter"><div class="fichehalfleft">';
468 print '<a name="builddoc"></a>'; // ancre
469
470 $includedocgeneration = 1;
471
472 // Documents
473 if ($includedocgeneration) {
474 $objref = dol_sanitizeFileName($object->ref);
475 $relativepath = $objref.'/'.$objref.'.pdf';
476 $filedir = $conf->recruitment->dir_output.'/'.$object->element.'/'.$objref;
477 $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
478 $genallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'read'); // If you can read, you can build the PDF to read content
479 $delallowed = $user->hasRight('recruitment', 'recruitmentjobposition', 'write'); // If you can create/edit, you can remove a file on card
480 print $formfile->showdocuments('recruitment:RecruitmentJobPosition', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
481 }
482
483 // Show links to link elements
484 $tmparray = $form->showLinkToObjectBlock($object, array(), array('recruitmentjobposition'), 1);
485 $linktoelem = $tmparray['linktoelem'];
486 $htmltoenteralink = $tmparray['htmltoenteralink'];
487 print $htmltoenteralink;
488
489 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
490
491 // Show link to public job page
493 print '<br><!-- Link to go on public job page -->'."\n";
494 // Load translation files required by the page
495 $langs->loadLangs(array('recruitment'));
496
497 $out = img_picto('', 'globe').' <span class="opacitymedium">'.$langs->trans("PublicUrl").'</span><br>';
498
499 $url = getPublicJobPositionUrl(0, $object->ref);
500 $out .= '<div class="urllink"><input type="text" id="recruitmentjobpositionurl" class="quatrevingtpercent" value="'.$url.'">';
501 $out .= '<a href="'.$url.'" target="_blank" rel="noopener noreferrer">'.img_picto('', 'globe').'</a></div>';
502 $out .= ajax_autoselect("recruitmentjobpositionurl", '0');
503
504 print $out;
505 }
506
507 print '</div><div class="fichehalfright">';
508
509 $MAXEVENT = 10;
510
511 $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/recruitment/recruitmentjobposition_agenda.php?id='.$object->id);
512
513 // List of actions on element
514 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
515 $formactions = new FormActions($db);
516 $somethingshown = $formactions->showactions($object, $object->element.'@recruitment', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlcenter);
517
518 print '</div></div>';
519 }
520
521 //Select mail models is same action as presend
522 if (GETPOST('modelselected')) {
523 $action = 'presend';
524 }
525
526 // Presend form
527 $modelmail = 'recruitmentjobposition';
528 $defaulttopic = 'InformationMessage';
529 $diroutput = $conf->recruitment->dir_output;
530 $trackid = 'recruitmentjobposition'.$object->id;
531
532 include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
533}
534
535// End of page
536llxFooter();
537$db->close();
$id
Definition account.php:39
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:70
Class to manage standard extra fields.
Class to manage building of HTML components.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to manage building of HTML components.
Class to manage projects.
Class for RecruitmentJobPosition.
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
ajax_autoselect($htmlname, $addlink='', $textonlink='Link')
Make content of an input box selected when we click into input field.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
img_edit($titlealt='default', $float=0, $other='')
Show logo edit/modify fiche.
getPublicJobPositionUrl($mode, $ref='', $localorexternal=0)
Return string with full Url.
recruitmentjobpositionPrepareHead($object)
Prepare array of tabs for RecruitmentJobPosition.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.