Alpha 2.3.0 fixes :

- Multiple request templates on portal
- SelectField interface stabilization
- UI fixes on portal
- Forms updates on lifecycle

SVN:trunk[3970]
This commit is contained in:
Guillaume Lajarige
2016-03-29 12:33:08 +00:00
parent 2ab12d9d11
commit 2a5ca467fd
8 changed files with 73 additions and 7 deletions

View File

@@ -0,0 +1,35 @@
<?php
// Copyright (C) 2010-2016 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;
use \Closure;
use \Dict;
use \Combodo\iTop\Form\Field\SelectField;
/**
* Description of MultipleSelectField
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
*/
class MultipleSelectField extends SelectField
{
const DEFAULT_MULTIPLE_VALUES_ENABLED = true;
}

View File

@@ -30,6 +30,7 @@ use \Combodo\iTop\Form\Field\MultipleChoicesField;
*/
class SelectField extends MultipleChoicesField
{
const DEFAULT_MULTIPLE_VALUES_ENABLED = false;
const DEFAULT_NULL_CHOICE_LABEL = 'UI:SelectOne';
const DEFAULT_STARTS_WITH_NULL_CHOICE = true;
@@ -75,4 +76,16 @@ class SelectField extends MultipleChoicesField
return $aChoices;
}
/**
* Overloads the method to prevent changing this property.
*
* @param boolean $bMultipleValuesEnabled
* @return \Combodo\iTop\Form\Field\SelectField
*/
public function SetMultipleValuesEnabled($bMultipleValuesEnabled)
{
// We don't allow changing this value
return $this;
}
}