N°931 Portal integration due to AttributeSet refactoring. UI still to be done.

This commit is contained in:
Molkobain
2018-09-28 16:32:27 +02:00
parent d3b3c44cbd
commit cf9c1b52ed
5 changed files with 48 additions and 12 deletions

View File

@@ -45,8 +45,9 @@ require_once APPROOT . 'sources/form/field/multipleselectfield.class.inc.php';
require_once APPROOT . 'sources/form/field/selectobjectfield.class.inc.php';
require_once APPROOT . 'sources/form/field/checkboxfield.class.inc.php';
require_once APPROOT . 'sources/form/field/radiofield.class.inc.php';
require_once APPROOT . 'sources/form/field/linkedsetfield.class.inc.php';
require_once APPROOT . 'sources/form/field/setfield.class.inc.php';
require_once APPROOT . 'sources/form/field/tagsetfield.class.inc.php';
require_once APPROOT . 'sources/form/field/linkedsetfield.class.inc.php';
require_once APPROOT . 'sources/form/validator/validator.class.inc.php';
require_once APPROOT . 'sources/form/validator/mandatoryvalidator.class.inc.php';
require_once APPROOT . 'sources/form/validator/integervalidator.class.inc.php';
@@ -57,7 +58,7 @@ require_once APPROOT . 'sources/renderer/renderingoutput.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/bsformrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bssimplefieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bsselectobjectfieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bssetfieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bslinkedsetfieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bsitemsetfieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bssubformfieldrenderer.class.inc.php';
require_once APPROOT . 'sources/renderer/bootstrap/fieldrenderer/bsfileuploadfieldrenderer.class.inc.php';

View File

@@ -0,0 +1,30 @@
<?php
// Copyright (C) 2010-2018 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 SetField
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
*/
class SetField extends Field
{
}

View File

@@ -55,7 +55,8 @@ class BsFormRenderer extends FormRenderer
$this->AddSupportedField('SubFormField', 'BsSubFormFieldRenderer');
$this->AddSupportedField('SelectObjectField', 'BsSelectObjectFieldRenderer');
$this->AddSupportedField('LinkedSetField', 'BsLinkedSetFieldRenderer');
$this->AddSupportedField('TagSetField', 'BsItemSetFieldRenderer');
$this->AddSupportedField('SetField', 'BsSetFieldRenderer');
$this->AddSupportedField('TagSetField', 'BsSetFieldRenderer');
$this->AddSupportedField('DateTimeField', 'BsSimpleFieldRenderer');
$this->AddSupportedField('DurationField', 'BsSimpleFieldRenderer');
$this->AddSupportedField('FileUploadField', 'BsFileUploadFieldRenderer');

View File

@@ -19,21 +19,16 @@
namespace Combodo\iTop\Renderer\Bootstrap\FieldRenderer;
use Exception;
use ApplicationContext;
use IssueLog;
use Dict;
use MetaModel;
use AttributeFriendlyName;
use Combodo\iTop\Renderer\FieldRenderer;
use Combodo\iTop\Renderer\RenderingOutput;
/**
* Description of BsItemSetFieldRenderer
* Description of BsSetFieldRenderer
*
* @author Guillaume Lajarige <guillaume.lajarige@combodo.com>
*/
class BsItemSetFieldRenderer extends FieldRenderer
class BsSetFieldRenderer extends FieldRenderer
{
/**
* @inheritdoc
@@ -119,7 +114,11 @@ EOF
{
$sItemLabel = $oItem->Get('label');
$sItemDescription = $oItem->Get('description');
$oOutput->AddHtml('<span class="label label-default" data-item-code="'.$sItemCode.'" data-item-label="'.$sItemLabel.'" data-item-description="">')
$oOutput->AddHtml('<span class="label label-default" data-code="'.$sItemCode.'" data-label="')
->AddHtml($sItemLabel, true)
->AddHtml('" data-description="')
->AddHtml($sItemDescription, true)
->AddHtml('">')
->AddHtml($sItemLabel, true)
->AddHtml('</span>');
}