issue #0001326 : Gestion des intervalles de dates comme les intervalles
This commit is contained in:
parent
4e71d73328
commit
64a68e1cc7
@ -815,7 +815,7 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
//Do some operation on value
|
||||
$types = array_keys($this->fields[$key]['fields']);
|
||||
|
||||
if ( !is_array($value) && !in_array($types[0], array('select', 'checkbox', 'interval')) ) {
|
||||
if ( !is_array($value) && !in_array($types[0], array('select', 'checkbox', 'interval', 'intervalDate')) ) {
|
||||
//Remove all space in string value
|
||||
$value = str_replace(' ', '', $value);
|
||||
//Try to detect separator and transform as array
|
||||
@ -834,7 +834,7 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
}
|
||||
}
|
||||
|
||||
if ( in_array($types[0], array('interval')) ) {
|
||||
if ( in_array($types[0], array('interval', 'intervalDate')) ) {
|
||||
$value = explode(',', $value);
|
||||
}
|
||||
|
||||
@ -845,6 +845,9 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
|
||||
//Before to save the value
|
||||
switch ( $types[0] ) {
|
||||
case 'intervalDate':
|
||||
unset($this->ciblage[$sessionKey]['in']);
|
||||
break;
|
||||
case 'interval':
|
||||
//@todo : Check Min Max
|
||||
//@todo : Check Number => A préciser dans Fields
|
||||
@ -869,9 +872,9 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
Zend_Registry::get('firebug')->info($value);
|
||||
$this->ciblage[$sessionKey]['ex'] = $value;
|
||||
} else {
|
||||
$this->ciblage[$sessionKey]['in'] = $value;
|
||||
Zend_Registry::get('firebug')->info('Include: ');
|
||||
Zend_Registry::get('firebug')->info($value);
|
||||
$this->ciblage[$sessionKey]['in'] = $value;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user