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