Selaa lähdekoodia

pa #650, #655: reparation du filtre inter-e/intra-e, ajout du filtre inter

FGM 13 vuotta sitten
vanhempi
säilyke
bfc6cca24e
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      fgcf.module

+ 5 - 4
fgcf.module

@@ -470,8 +470,9 @@ function fgcf_filter_form($form_state) {
     '#title'   => t('Modalité'),
     '#type'    => 'checkboxes',
     '#options' => array(
-      '1'    => t('Inter-entreprises'),
-      '2'    => t('Intra-entreprise'),
+      '1'    => t('Intra-entreprise'),
+      '2'    => t('Inter-entreprises'),
+      '4'    => t('Interne'),
       '999'  => t('Autres'),
     ),
     '#default_value' => $modalite,
@@ -519,8 +520,8 @@ function _fgcf_filter_form_translate_values() {
         // Get the actual possible values from the field definition.
         $field = content_fields('field_fgcf_fiche_modalite', 'fgcf_fiche');
         $allowed_values = content_allowed_values($field);
-        // Remove the first 2 options.
-        unset($allowed_values[1], $allowed_values[2]);
+        // Remove options 1 (intra), 2 (inter), 4 (internal).
+        unset($allowed_values[1], $allowed_values[2], $allowed_values[4]);
         // Remove the 'proxy' 'Autres' choice.
         unset($modalites[999]);
         // Add the actual values.