mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-21 08:12:26 +02:00
N°1318 - multiple choice in a template - first step
This commit is contained in:
@@ -28,5 +28,16 @@ class MultipleSelectField extends SelectField
|
||||
{
|
||||
/** @inheritDoc */
|
||||
const DEFAULT_MULTIPLE_VALUES_ENABLED = true;
|
||||
const DEFAULT_STARTS_WITH_NULL_CHOICE = false;
|
||||
|
||||
function SetCurrentValue($currentValue)
|
||||
{
|
||||
if ($currentValue != null) {
|
||||
$this->currentValue = $currentValue;
|
||||
} else {
|
||||
$this->currentValue = "";
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
29
sources/Form/Field/MultipleSelectObjectField.php
Normal file
29
sources/Form/Field/MultipleSelectObjectField.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2023 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Form\Field;
|
||||
|
||||
|
||||
/**
|
||||
* Description of MultipleSelectObjectField
|
||||
*
|
||||
* @author Acc
|
||||
* @since 3.1.0
|
||||
*/
|
||||
class MultipleSelectObjectField extends SelectObjectField
|
||||
{
|
||||
function SetCurrentValue($currentValue)
|
||||
{
|
||||
if ($currentValue != null) {
|
||||
$this->currentValue = $currentValue;
|
||||
} else {
|
||||
$this->currentValue = "";
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,20 @@ namespace Combodo\iTop\Form\Field;
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
*/
|
||||
class TagSetField extends Field
|
||||
class TagSetField extends SelectField
|
||||
{
|
||||
/** @inheritDoc */
|
||||
const DEFAULT_MULTIPLE_VALUES_ENABLED = true;
|
||||
const DEFAULT_STARTS_WITH_NULL_CHOICE = false;
|
||||
|
||||
function SetCurrentValue($currentValue)
|
||||
{
|
||||
if ($currentValue != null) {
|
||||
$this->currentValue = $currentValue;
|
||||
} else {
|
||||
$this->currentValue = "";
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
29
sources/Form/Field/TagSetObjectField.php
Normal file
29
sources/Form/Field/TagSetObjectField.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
// Copyright (C) 2010-2023 Combodo SARL
|
||||
//
|
||||
// This file is part of iTop.
|
||||
//
|
||||
// iTop is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// iTop is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with iTop. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
namespace Combodo\iTop\Form\Field;
|
||||
|
||||
/**
|
||||
* Description of TagSetField
|
||||
*
|
||||
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
|
||||
*/
|
||||
class TagSetObjectField extends MultipleSelectObjectField
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user