diff --git a/library/Scores/Fields.php b/library/Scores/Fields.php index 477b5f6c..34d09fb4 100644 --- a/library/Scores/Fields.php +++ b/library/Scores/Fields.php @@ -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': diff --git a/public/themes/default/scripts/fields.js b/public/themes/default/scripts/fields.js index f78cd30a..e7a0296e 100644 --- a/public/themes/default/scripts/fields.js +++ b/public/themes/default/scripts/fields.js @@ -243,32 +243,36 @@ function set(key, value, ex) if (data.insee>0) { html = html + ' (dont '+data.insee +' 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( '
'+ '

'+ - 'Information Valeur saisi incorrecte.

'+ + 'Information : Valeur saisi incorrecte.

'+ '
'); + $('#comptage').css('display','block'); } if (data.error==1) { $('div#actionMessage').html( '
'+ '

'+ - 'Erreur: Un problème technique est survenu.

'+ - '
'); + 'Erreur : Un problème technique est survenu.

'+ + ''); + $('#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'); }); } diff --git a/public/themes/default/scripts/scripts.js b/public/themes/default/scripts/scripts.js index f38f3ccf..f20b86fe 100644 --- a/public/themes/default/scripts/scripts.js +++ b/public/themes/default/scripts/scripts.js @@ -45,7 +45,7 @@ $(document).ready(function(){ //@todo : ... $(this).load('/comptage/savedialog'); }, - Annuler: function() { $(this).dialog('close'); } + Fermer: function() { $(this).dialog('close'); } }, close: function() { $('#dialog').remove(); } };