Projet

Général

Profil

Révision 560c3060

Ajouté par Julien Enselme il y a plus de 8 ans

Update ctools 1.7 -> 1.9

Voir les différences:

drupal7/sites/all/modules/ctools/includes/context-admin.inc
736 736
    '#default_value' => $conf['keyword'],
737 737
  );
738 738

  
739
  if ($type_info['key'] == 'requiredcontexts') {
740
    $form['optional'] = array(
741
      '#type' => 'checkbox',
742
      '#title' => t('Context is optional'),
743
      '#default_value' => !empty($form_state['conf']['optional']),
744
      '#description' => t('This context need not be present for the component to function.'),
745
    );
746
  }
747

  
739 748
  $form['#submit'][] = 'ctools_edit_context_form_defaults_submit';
740 749

  
741 750
  return $form;
......
752 761
    $form_state['conf']['default'] = $form_state['values']['default'];
753 762
    $form_state['conf']['title'] = $form_state['values']['title'];
754 763
  }
764
  if ($form_state['type info']['key'] == 'requiredcontexts') {
765
    $form_state['conf']['optional'] = $form_state['values']['optional'];
766
  }
755 767

  
756 768
  $form_state['conf']['identifier'] = $form_state['values']['identifier'];
757 769
  $form_state['conf']['keyword'] = $form_state['values']['keyword'];

Formats disponibles : Unified diff