Ajout des données
This commit is contained in:
parent
210701a2c9
commit
3bcf15e2d7
@ -1,23 +1,21 @@
|
|||||||
<?php if (count($this->inLabels)>0) {?>
|
<?php if (count($this->inLabels)>0) {?>
|
||||||
<ul>
|
<div class="list-group">
|
||||||
<?php foreach ($this->inLabels as $i => $item) {?>
|
<?php foreach ($this->inLabels as $i => $item) {?>
|
||||||
<li><?=$item?>
|
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'remove', 'critere'=>$this->critereName, 'in'=>$i ),
|
||||||
<a class="remove" href="<?=$this->url(array('controller'=>'index', 'action'=>'remove',
|
null, true)?>" class="list-group-item remove"><?=$item?>
|
||||||
'critere'=>$this->critereName, 'in'=>$i ), null, true)?>">
|
<button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Supprimer</span></button>
|
||||||
<img src="/themes/default/images/cross.png" alt="Supprimer la valeur"></a>
|
</a>
|
||||||
</li>
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</ul>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
||||||
|
|
||||||
<?php if (count($this->exLabels)>0) {?>
|
<?php if (count($this->exLabels)>0) {?>
|
||||||
<ul>
|
<div class="list-group">
|
||||||
<?php foreach ($this->exLabels as $i => $item) {?>
|
<?php foreach ($this->exLabels as $i => $item) {?>
|
||||||
<li><?=$item?>
|
<a href="<?=$this->url(array('controller'=>'index', 'action'=>'remove', 'critere'=>$this->critereName, 'ex'=>$i ),
|
||||||
<a class="remove" href="<?=$this->url(array('controller'=>'index', 'action'=>'remove',
|
null, true)?>" class="list-group-item remove"><?=$item?>
|
||||||
'critere'=>$this->critereName, 'ex'=>$i ), null, true)?>">
|
<button type="button" class="close"><span aria-hidden="true">×</span><span class="sr-only">Supprimer</span></button>
|
||||||
<img src="/themes/default/images/cross.png" alt="Supprimer la valeur"></a>
|
</a>
|
||||||
</li>
|
|
||||||
<?php }?>
|
<?php }?>
|
||||||
</ul>
|
</div>
|
||||||
<?php }?>
|
<?php }?>
|
@ -834,6 +834,16 @@ class Scores_Ciblage_FieldList
|
|||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isMultiple($key)
|
||||||
|
{
|
||||||
|
if ( is_array( $this->items[$key]['type']) ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
|
@ -89,7 +89,14 @@ class Scores_Ciblage_Session
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Merge with data already in session if needed
|
//Merge with data already in session if needed
|
||||||
|
if ( $this->fields->isMultiple($key) ) {
|
||||||
|
if ($ex) {
|
||||||
|
$existingValue = count($this->ciblage->select[$key]['ex']) ? $this->ciblage->select[$key]['ex'] : array();
|
||||||
|
} else {
|
||||||
|
$existingValue = count($this->ciblage->select[$key]['in']) ? $this->ciblage->select[$key]['in'] : array();
|
||||||
|
}
|
||||||
|
$valueToSave = array_merge($valueToSave, $existingValue);
|
||||||
|
}
|
||||||
|
|
||||||
//Prepare to save date in session
|
//Prepare to save date in session
|
||||||
if ( $valueToSave !== null ) {
|
if ( $valueToSave !== null ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user