issue #0001284 : Correction système d'afficahge des erreurs
This commit is contained in:
parent
e03047ee7d
commit
bf0d109eaa
@ -757,7 +757,8 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
public function setCritere($key, $value, $ex = false)
|
||||
{
|
||||
//Check if the key exist
|
||||
if ( !in_array($key, $this->fields) ) {
|
||||
if ( !array_key_exists($key, $this->fields) ) {
|
||||
Zend_Registry::get('firebug')->info('CLE INCORRECT');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -808,7 +809,6 @@ Les zones urbaines sensibles constituent un sous-ensemble de l'ensemble plus lar
|
||||
case 'checkbox':
|
||||
if ( $value==0 ) {
|
||||
unset($this->ciblage[$key]);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 'tree':
|
||||
|
@ -243,32 +243,36 @@ function set(key, value, ex)
|
||||
if (data.insee>0) {
|
||||
html = html + ' (dont <span class="valeur">'+data.insee +'</span> unité(s) insee)';
|
||||
}
|
||||
//
|
||||
$('#attente').css('display', 'none');
|
||||
$('#comptage').html(html).css('display','block');
|
||||
|
||||
//Resume criteres content
|
||||
$.get('/index/criteres/ajax/1', function(data){
|
||||
$('#panel').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
if (data.error==2) {
|
||||
$('div#actionMessage').html(
|
||||
'<div class="ui-state-highlight ui-corner-all" style="padding: .7em;">'+
|
||||
'<p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span>'+
|
||||
'<strong>Information </strong> Valeur saisi incorrecte.</p>'+
|
||||
'<strong>Information : </strong>Valeur saisi incorrecte.</p>'+
|
||||
'</div>');
|
||||
$('#comptage').css('display','block');
|
||||
}
|
||||
|
||||
if (data.error==1) {
|
||||
$('div#actionMessage').html(
|
||||
'<div class="ui-state-error ui-corner-all" style="padding: .7em;">'+
|
||||
'<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>'+
|
||||
'<strong>Erreur:</strong> Un problème technique est survenu.</p>'+
|
||||
'</div>');
|
||||
'<strong>Erreur : </strong>Un problème technique est survenu.</p>'+
|
||||
'</div>');
|
||||
$('#comptage').css('display','block');
|
||||
}
|
||||
|
||||
//
|
||||
$('#attente').css('display', 'none');
|
||||
|
||||
|
||||
//Resume criteres content
|
||||
$.get('/index/criteres/ajax/1', function(data){
|
||||
$('#panel').html(data);
|
||||
});
|
||||
|
||||
}, 'json').error(function(){ alert('Erreur inconnue'); });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user