Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/131/da025748 select inactive users #549

Open
wants to merge 8 commits into
base: 20.0_cdcconseil
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog_cdcconseil
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- FIX/SUPPORT/DA025922/SetSpecialCharacter because the character '<' was not set into the whitelist of special character which causes an issue when you try to fetch this type of extrafields - *30/12/2024*
- FIX/SUPPORT/DA025748/SELECT_INACTIVE_USERS - *19/12/2024*
- FIX/SUPPORT/DA025737/HIDDEN_DROPDOWN - *19/12/2024*
- FIX/SUPPORT/DA025871/FiltreEvalListe - **16/12/2024**
- FIX/SUPPORT/DA025787/HRM_closed_job_position_on_application - *04/12/2024*
Expand Down
15 changes: 12 additions & 3 deletions htdocs/hrm/class/position.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ class Position extends CommonObject
'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'position' => 500, 'notnull' => 1, 'visible' => -2,),
'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'position' => 501, 'notnull' => 0, 'visible' => -2,),
'fk_contrat' => array('type' => 'integer:Contrat:contrat/class/contrat.class.php', 'label' => 'fk_contrat', 'enabled' => 'isModEnabled("contract")', 'position' => 50, 'notnull' => 0, 'visible' => 0,),
'fk_user' => array('type' => 'integer:User:user/class/user.class.php:0:(t.statut:=:1)', 'label' => 'Employee', 'enabled' => 1, 'position' => 55, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'picto' => 'user', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
// BACKPORT STD #32092
'fk_user' => array('type' => 'integer:User:user/class/user.class.php:0', 'label' => 'Employee', 'enabled' => 1, 'position' => 55, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'picto' => 'user', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
// END BACKPORT
'fk_job' => array('type' => 'integer:Job:/hrm/class/job.class.php', 'label' => 'JobProfile', 'enabled' => 1, 'position' => 56, 'notnull' => 1, 'visible' => 1, 'picto' => 'jobprofile', 'css' => 'maxwidth300 widthcentpercentminusxx', 'csslist' => 'tdoverflowmax150'),
'date_start' => array('type' => 'date', 'label' => 'DateStart', 'enabled' => 1, 'position' => 101, 'notnull' => 1, 'visible' => 1,),
'date_end' => array('type' => 'date', 'label' => 'DateEnd', 'enabled' => 1, 'position' => 102, 'notnull' => 0, 'visible' => 1,),
Expand Down Expand Up @@ -847,12 +849,19 @@ public function LibStatut($status, $mode = 0)
*/
public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0)
{
global $langs;
global $langs, $form;

// BACKPORT STD #32092
if (!($form instanceof Form)) {
$form = new Form($this->db);
}
// END BACKPORT

if ($key == 'fk_user') {
$vacantId = $keyprefix.$key.'vacant'.$keysuffix;

$out = parent::showInputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);
$out = $form->select_dolusers($value, 'search_'.$key, 1, null, 0, '', '', '0', 0, 0, '', 0, '', (!empty($val['css']) ? $val['css'] : 'maxwidth100'));

$out .= '<label class="nowrap position-fk-user classfortooltip" title="'.dol_escape_js($langs->trans('VacantCheckboxHelper')).'"><input type="checkbox" id="'.$vacantId.'" name="'.$vacantId.'">&nbsp;'.$langs->trans("Vacant").'</label>'; ?>
<script type="text/javascript">
$(document).ready(function () {
Expand Down
Loading