fix sticker 1
This commit is contained in:
parent
7868aa305b
commit
dbcbda642a
@ -855,12 +855,10 @@ class Position extends CommonObject
|
|||||||
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
|
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0)
|
public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0, $nonewbutton = 0) {
|
||||||
{
|
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if($key == 'fk_user')
|
if($key == 'fk_user') {
|
||||||
{
|
|
||||||
$vacantId = $keyprefix.$key.'vacant'.$keysuffix;
|
$vacantId = $keyprefix.$key.'vacant'.$keysuffix;
|
||||||
|
|
||||||
$out = parent::showInputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);
|
$out = parent::showInputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);
|
||||||
@ -869,8 +867,8 @@ class Position extends CommonObject
|
|||||||
?>
|
?>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var checkbox = $('#<?php print $vacantId; ?>')
|
var checkbox = $('#<?php print $vacantId; ?>');
|
||||||
var searchfkuser = $('#<?php print $keyprefix.$key.$keysuffix; ?>')
|
var searchfkuser = $('#<?php print $keyprefix.$key.$keysuffix; ?>');
|
||||||
checkbox.click(function () {
|
checkbox.click(function () {
|
||||||
if (checkbox.prop('checked')) {
|
if (checkbox.prop('checked')) {
|
||||||
searchfkuser.val(0).trigger('change');
|
searchfkuser.val(0).trigger('change');
|
||||||
@ -878,8 +876,8 @@ class Position extends CommonObject
|
|||||||
} else {
|
} else {
|
||||||
searchfkuser.prop('disabled', 0);
|
searchfkuser.prop('disabled', 0);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
@ -903,12 +901,10 @@ class Position extends CommonObject
|
|||||||
* @param mixed $morecss Value for css to define size. May also be a numeric.
|
* @param mixed $morecss Value for css to define size. May also be a numeric.
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '')
|
public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '') {
|
||||||
{
|
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if($key == 'fk_user' && $this->fk_user == 0)
|
if($key == 'fk_user' && $this->fk_user == 0) {
|
||||||
{
|
|
||||||
return $langs->trans("VacantPosition");
|
return $langs->trans("VacantPosition");
|
||||||
}
|
}
|
||||||
return parent::showOutputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);
|
return parent::showOutputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user