mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
Merge branch 'support/2.6.2'
This commit is contained in:
@@ -2178,11 +2178,14 @@ EOF
|
|||||||
if ((count($aAllowedValues) == 1) && ($bMandatory == 'true'))
|
if ((count($aAllowedValues) == 1) && ($bMandatory == 'true'))
|
||||||
{
|
{
|
||||||
// When there is only once choice, select it by default
|
// When there is only once choice, select it by default
|
||||||
|
if($value != $key)
|
||||||
|
{
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
$('#$iId').attr('data-validate','dependencies');
|
$('#$iId').attr('data-validate','dependencies');
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
|
}
|
||||||
$sSelected = ' selected';
|
$sSelected = ' selected';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -208,12 +208,15 @@ class UIExtKeyWidget
|
|||||||
{
|
{
|
||||||
// When there is only once choice, select it by default
|
// When there is only once choice, select it by default
|
||||||
$sSelected = 'selected';
|
$sSelected = 'selected';
|
||||||
|
if($value != $key)
|
||||||
|
{
|
||||||
$oPage->add_ready_script(
|
$oPage->add_ready_script(
|
||||||
<<<EOF
|
<<<EOF
|
||||||
$('#$this->iId').attr('data-validate','dependencies');
|
$('#$this->iId').attr('data-validate','dependencies');
|
||||||
EOF
|
EOF
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$sSelected = (is_array($value) && in_array($key, $value)) || ($value == $key) ? 'selected' : '';
|
$sSelected = (is_array($value) && in_array($key, $value)) || ($value == $key) ? 'selected' : '';
|
||||||
|
|||||||
Reference in New Issue
Block a user