/[drupal]/drupal/modules/field_ui/field_ui.admin.inc
ViewVC logotype

Diff of /drupal/modules/field_ui/field_ui.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.27, Tue Nov 3 05:27:18 2009 UTC revision 1.28, Sun Nov 8 09:24:55 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: field_ui.admin.inc,v 1.26 2009/10/29 07:21:04 webchick Exp $  // $Id: field_ui.admin.inc,v 1.27 2009/11/03 05:27:18 webchick Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 812  function field_ui_field_settings_form($f Line 812  function field_ui_field_settings_form($f
812      $field = field_read_field($field['field_name']);      $field = field_read_field($field['field_name']);
813    }    }
814    
815    $field_type = field_info_field_types($field['type']);    drupal_set_title($instance['label']);
   
   $info_function = $field['module'] . '_field_info';  
   $info = $info_function();  
   $description = '<p><strong>' . $info[$field['type']]['label'] . ':</strong> ';  
   $description .= $info[$field['type']]['description'] . '</p>';  
   $form['#prefix'] = '<div class="description">' . $description . '</div>';  
816    
817    $description = '<p>' . t('These settings apply to the %field field everywhere it is used. These settings impact the way that data is stored in the database and cannot be changed once data has been created.', array('%field' => $instance['label'])) . '</p>';    $description = '<p>' . t('These settings apply to the %field field everywhere it is used. These settings impact the way that data is stored in the database and cannot be changed once data has been created.', array('%field' => $instance['label'])) . '</p>';
818    
819    // Create a form structure for the field values.    // Create a form structure for the field values.
820    $form['field'] = array(    $form['field'] = array(
821      '#type' => 'fieldset',      '#type' => 'fieldset',
822      '#title' => t('%field field settings', array('%field' => $instance['label'])),      '#title' => t('Field settings'),
823      '#description' => $description,      '#description' => $description,
824      '#tree' => TRUE,      '#tree' => TRUE,
825    );    );
# Line 856  function field_ui_field_settings_form($f Line 850  function field_ui_field_settings_form($f
850    // responsible for not returning settings that cannot be changed if    // responsible for not returning settings that cannot be changed if
851    // the field already has data.    // the field already has data.
852    $form['field']['settings'] = array();    $form['field']['settings'] = array();
853    $additions = module_invoke($field_type['module'], 'field_settings_form', $field, $instance, $has_data);    $additions = module_invoke($field['module'], 'field_settings_form', $field, $instance, $has_data);
854    if (is_array($additions)) {    if (is_array($additions)) {
855      $form['field']['settings'] = $additions;      $form['field']['settings'] = $additions;
856    }    }
# Line 1138  function field_ui_field_edit_form($form, Line 1132  function field_ui_field_edit_form($form,
1132      field_ui_default_value_widget($field, $instance, $form, $form_state);      field_ui_default_value_widget($field, $instance, $form, $form_state);
1133    }    }
1134    
   $info = field_info_field_types($field['type']);  
   $description = '<p><strong>' . $info['label'] . ':</strong> ';  
   $description .= $info['description'] . '</p>';  
   $form['#prefix'] = '<div class="description">' . $description . '</div>';  
   
1135    $has_data = field_has_data($field);    $has_data = field_has_data($field);
1136    if ($has_data) {    if ($has_data) {
1137      $description = '<p>' . t('These settings apply to the %field field everywhere it is used. Because the field already has data, some settings can no longer be changed.', array('%field' => $instance['label'])) . '</p>';      $description = '<p>' . t('These settings apply to the %field field everywhere it is used. Because the field already has data, some settings can no longer be changed.', array('%field' => $instance['label'])) . '</p>';

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28

  ViewVC Help
Powered by ViewVC 1.1.2