correction dans le helper probleme avec les selected des selects...
This commit is contained in:
parent
fe2e2dfb74
commit
80e12eda14
@ -135,12 +135,12 @@ Class Zend_View_Helper_Field extends Zend_View_Helper_Abstract
|
||||
if(is_array($sessionValeur))
|
||||
$sessionValeur = implode(',', $sessionValeur);
|
||||
$return = '<select class="criteres '.$field['type']['class'].'" name="'.$name.'">';
|
||||
$return .= '<option value="tous">Tous</option>';
|
||||
$return .= '<option '.(($sessionValeur == 'tous')?'selected':'').' value="tous">Tous</option>';
|
||||
foreach($field['fields'][$field['type']]['value'] as $value => $label) {
|
||||
$selected = "";
|
||||
if(($sessionValeur != null) and $sessionValeur == $value)
|
||||
if(($sessionValeur != null) and $sessionValeur == $value and $sessionValeur != "tous")
|
||||
$selected = " selected";
|
||||
$return .= '<option'.((!empty($selected))?$selected:null).' value="'.$value.'">'.$label.'</option>';
|
||||
$return .= '<option'.$selected.' value="'.$value.'">'.$label.'</option>';
|
||||
}
|
||||
$return .= '</select>';
|
||||
return ($return);
|
||||
|
Loading…
Reference in New Issue
Block a user