Ignorar:
Fecha y hora:
26/05/2016 19:21:52 (hace 8 años)
Autor:
José Gregorio Puentes <jpuentes@…>
Branches:
stable, version-3.0
Children:
dedbde1
Parents:
663b989
Mensaje:

se actualizo el modulo

Fichero:
1 editado

Leyenda

No modificado
Añadido
Eliminado
  • modules_contrib/editablefields/editablefields.module

    r177a560 r1dd3f69  
    11<?php
     2// $Id: editablefields.module,v 1.3.2.17.2.10 2010/01/18 08:48:10 markfoodyburton Exp $
    23
    34/**
     
    78
    89/**
    9  * Implementation of hook_perm.
    10  *
    11  * @return array
    12  * An array of permissions that this module provides.
    13  */
    14 function editablefields_perm() {
    15   return array('administer editablefields');
    16 }
    17 
    18 /**
    19  * Implementation of hook_ctools_plugin_directory().
    20  *
    21  * @param $module
    22  * @param $plugin_type
    23  * @return string
    24  */
    25 function editablefields_ctools_plugin_directory($module, $plugin_type) {
    26 
    27   if ($plugin_type == 'export_ui') {
    28     return "plugins/export_ui";
    29   }
    30 
    31   if ($module == 'editablefields' && !empty($plugin_type)) {
    32     return "plugins/$plugin_type";
    33   }
    34 }
    35 
    36 
    37 /**
    38  * Implementation of hook_ctools_plugin_api().
    39  *
    40  * Tell Ctools that we support the default_editablefields_presets API.
    41  */
    42 function editablefields_ctools_plugin_api($owner, $api) {
    43   if ($owner == 'editablefields' && $api == 'default_editablefields_presets') {
    44     return array('version' => 1);
    45   }
    46 }
    47 
    48 /**
    49  * Implementation of hook_default_editablefields_preset().
    50  *
    51  * Provide a couple of default presets.
    52  */
    53 function editablefields_default_editablefields_preset() {
    54   $export = array();
    55 
    56   $export['modal'] = (object) array(
    57     'api_version' => 1,
    58     'name' => 'modal',
    59     'description' => 'Display the field form in a Modal Dialog',
    60     'config' => array(
    61       'editable_type' => 'modal',
    62     ),
    63   );
    64 
    65   $export['html'] = (object) array(
    66     'api_version' => 1,
    67     'name' => 'html',
    68     'description' => 'Display the field form inline',
    69     'config' => array(
    70       'editable_type' => 'html',
    71     )
    72   );
    73 
    74   return $export;
    75 }
    76 
    77 /**
    78  * Implementation of hook_menu_alter().
    79  */
    80 function editablefields_menu_alter(&$items) {
    81   // takeover the filefield ahah callback. This is a temporary hackish solution.
    82   if (isset($items['filefield/ahah/%/%/%'])) {
    83     $items['filefield/ahah/%/%/%'] = array(
    84       'page callback' => 'editablefields_filefield_js',
    85     ) + $items['filefield/ahah/%/%/%'];
    86   }
    87 }
    88 
    89 /**
    9010 * Implementation of hook_menu().
    9111 */
    9212function editablefields_menu() {
     13  global $user;
    9314  $items = array();
    9415
     
    9920    'type' => MENU_CALLBACK,
    10021    'title' => 'ajax view',
    101   );
     22    );
    10223  $items['editablefields_html'] = array(
    10324    'page callback' => 'editablefields_html',
     
    10526    'type' => MENU_CALLBACK,
    10627    'title' => 'ajax form',
    107   );
     28    );
    10829  $items['editablefields_submit'] = array(
    10930    'page callback' => 'editablefields_submit',
     
    11132    'type' => MENU_CALLBACK,
    11233    'title' => 'ajax submit',
    113   );
    114 
    115   $plugins = editablefields_get_responders();
    116   foreach($plugins as $plugin_name => $plugin) {
    117     foreach($plugin['hook_menu'] as $plugin_item_path => $plugin_item) {
    118       $items[$plugin_item_path] = $plugin_item + array(
    119         'title' => $plugin['title'],
    120         'file' => $plugin['file'],
    121         'file path' => $plugin['path'],
    122         'type' => MENU_CALLBACK,
    123       );
    124     }
    125   }
     34    );
    12635
    12736  return $items;
     
    13241 */
    13342function editablefields_theme() {
    134  
    135   $items = array();
    136  
    137   $plugins = editablefields_get_editables();
    138   foreach($plugins as $plugin_name => $plugin) {
    139     if (!empty($plugin['theme'])) {
    140       $items = array_merge($items, $plugin['theme']);
    141     }
    142   }
    143 
    144   return $items;
    145 }
    146 
    147 /*
    148 function editablefields_theme_registry_alter(&$items) {
    149   $items['views_view_field']['function'] = 'editablefields_views_view_field';
    150 }
    151 */
     43  return array(
     44    'editablefields_formatter_editable' => array(
     45      'arguments' => array('element' => NULL),
     46      'function' => 'theme_editablefields_formatter_editable',
     47      ),
     48    'editablefields_formatter_editable_html' => array(
     49      'arguments' => array('element' => NULL),
     50      'function' => 'theme_editablefields_formatter_editable',
     51      ),
     52    'editablefields_formatter_clicktoedit' => array(
     53      'arguments' => array('element' => NULL),
     54      'function' => 'theme_editablefields_formatter_editable',
     55      ),
     56    );
     57}
    15258
    15359/**
     
    15561 */
    15662function editablefields_field_formatter_info() {
    157   $items = array();
    158  
    159   $plugins = editablefields_get_editables();
    160   foreach($plugins as $plugin_name => $plugin) {
    161     if (!empty($plugin['formatter_info'])) {
    162       $items = array_merge($items, $plugin['formatter_info']);
    163     }
    164   }
    165  
    166   return $items;
    167 }
    168 
    169 /**
    170  * Implementation of hook_content_build_modes().
    171  *
    172  * @return array
    173  */
    174 //agrega los widgets en editable(node type)
    175 function editablefields_content_build_modes() {
    176   // Tell CCK about our "build" modes so that users can specify
    177   // how they want the text in their modal/other link to be formatted
    178   // on the Display Fields tab of the CCK admin.
    179   $build_modes = array();
    180   $plugins = editablefields_get_responders();
    181   if (!empty($plugins)) {
    182     $build_modes = array(
    183       'editablefields' => array(
    184         'title' => t('Editable mode'),
    185         'build modes' => array(),
    186       ),
    187     );
    188     foreach($plugins as $plugin_name => $plugin) {
    189       foreach($plugin['build modes'] as $mode_name => $mode_info) {
    190         $build_modes['editablefields']['build modes'][$mode_name] = $mode_info;   
    191       }
    192     }
    193   }
    194   return $build_modes;
    195 }
    196 
    197 /**
    198  * Implementation of hook_form_alter().
    199  */
    200 //elimina los widgets editables
    201 function editablefields_form_alter(&$form, &$form_state, $form_id) {
    202   if ($form_id == 'content_display_overview_form') {
    203     // Remove editable field formatters from the options.
    204     if ($form['#contexts'] == 'editablefields') {
    205       $formatters = editablefields_field_formatter_info();
    206       foreach($form as $key => &$element) {
    207         if (substr($key, 0, 6) == 'field_') {
    208           foreach($element as $setting_name => &$setting) {
    209             if (!empty($setting['format'])) {
    210               foreach($formatters as $formatter_name => $formatter) {
    211                 unset($setting['format']['#options'][$formatter_name]);
    212                 unset($setting['format']['base']['#options'][$formatter_name]);
    213               }
    214             }
    215           }
    216         }
    217       }
    218     }
    219   }
    220  
    221 }
    222 
    223 
    224 
    225 /**
    226  * Editablefields version of replace CTools command.
    227  * It uses the
    228  *
    229  * The replace command will replace a portion of the current document
    230  * with the specified HTML.
    231  *
    232  * @param $html
    233  *   The data to use with the jquery replace() function.
    234  *
    235  * @return array
    236  */
    237 function ctools_ajax_command_replace_active_element($index, $html) {
    23863  return array(
    239     'command' => 'replace_active_element',
    240     'active_elem_index' => $index,
    241     'data' => $html,
    242   );
    243 }
    244 
     64    'editable' => array(
     65      'label' => t('Editable (Ajax)'),
     66      'field types' => array_keys(_content_field_types()),
     67      ),
     68    'editable_html' => array(
     69      'label' => t('Editable (HTML)'),
     70      'field types' => array_keys(_content_field_types()),
     71      ),
     72    'clicktoedit' => array(
     73      'label' => t('Click to Edit'),
     74      'field types' => array_keys(_content_field_types()),
     75      ),
     76    );
     77}
    24578
    24679/**
    24780 * Theme the editable field.
    24881 */
    249 /*
    25082function theme_editablefields_formatter_editable($element) {
    251 
    25283  static $js_ready;
    25384
    25485  $field_name = $element['#field_name'];
    25586  $field = content_fields($field_name);
    256 
    257   $revision = !empty($element['#node']->vid) ? $element['#node']->vid : NULL;
    258   $node = node_load($element['#node']->nid, $revision);
     87  $node = $element['#node'];
    25988  $delta = $element['#item']['#delta'];
    26089
    261   // to disable overriding textareas just set this variable to 0
    262   if (variable_get('editablefields_textareas_resizable_threshold', 25)) {
    263     static $textareas_count = 0;
    264     if (
    265       $field['type'] == 'text' && $field['widget']['type'] == 'text_textarea') {
    266       if ($textareas_count++
    267         >= variable_get('editablefields_textareas_resizable_threshold', 25)) {
    268         drupal_add_js(drupal_get_path('module', 'editablefields')
    269                         . '/editablefields_overrides.js');
    270       }
    271     }
     90  if (content_handle('widget', 'multiple values', $field) == CONTENT_HANDLE_CORE) {
    27291  }
    27392
     
    288107        $js_ready = TRUE;
    289108        drupal_add_js('misc/jquery.form.js');
    290         drupal_add_js(
    291           drupal_get_path('module', 'editablefields') . '/editablefields.js');
    292         drupal_add_css(
    293           drupal_get_path('module', 'editablefields') . '/editablefields.css');
     109        drupal_add_js(drupal_get_path('module', 'editablefields') . '/editablefields.js');
     110        drupal_add_css(drupal_get_path('module', 'editablefields') . '/editablefields.css');
    294111
    295112        $settings = array(
    296113          'url_html' => url('editablefields_html', array('absolute' => TRUE)),
    297           'url_submit' => url('editablefields_submit',
    298                               array('absolute' => TRUE)),
     114          'url_submit' => url('editablefields_submit', array('absolute' => TRUE)),
    299115          'url_view' => url('editablefields_view', array('absolute' => TRUE)),
    300           'clicktoedit_message' => theme('editablefields_clicktoedit_message'),
    301           'clicktoedit_message_empty' => theme('editablefields_clicktoedit_message_empty'),
     116          'clicktoedit_message' => '<div class="editablefields_clicktoedit_message">'. t('[edit]') .'</div>',
    302117        );
    303118        drupal_add_js(array('editablefields' => $settings), 'setting');
    304119      }
    305 
    306       // [andreiashu] not sure how this works exactly but it does...
    307       if (content_handle('widget', 'multiple values', $field)
    308         != CONTENT_HANDLE_CORE) {
    309         if ($delta != 0) {
    310           return;
    311         }
    312       }
    313 
    314120      $theme = $formatter['module'] . '_formatter_' . $formatter_name;
    315121      $class = "editablefields";
    316       if ($element['#formatter'] == 'editable') {
    317         $class .= " ajax-editable";
    318       }
    319       elseif ($element['#formatter'] == 'clicktoedit') {
     122      if ($element['#formatter'] == 'clicktoedit') {
    320123        $class .= " clicktoedit";
    321124      }
     
    323126        $class .= " editablefields-html-load";
    324127      }
    325 
    326       $pre = '<div class="' . $class . '" nid="' . $node->nid . '" field="'
    327         . $field_name . '" delta="' . $delta . '">';
     128      // CORE handling shoudl have a div on each,
     129      // MODULE handling should have a div surounding all elements (treat it as
     130      // one field) (So, we'll arrainge for the JS to remove the rest!)
     131      if (content_handle('widget', 'multiple values', $field) != CONTENT_HANDLE_CORE) {
     132        if ($delta != 0) {
     133          $class = "editablefields editablefields_REMOVE";
     134        }
     135      }
     136
     137      $pre = '<div class="' . $class . '" nid="' . $node->nid . '" field="' . $field_name . '" delta="' . $delta . '">';
    328138      $post = '</div>';
    329139
    330140      if ($element['#formatter'] != 'editable_html') {
    331         $themed_element = theme($theme, $element);
    332 
    333         // add the edit link for clicktoedit formatters
    334         if ($element['#formatter'] == 'clicktoedit') {
    335           if (!empty($themed_element)) {
    336             $pre .= theme('editablefields_clicktoedit_message');
    337           }
    338           else {
    339             $pre .= theme('editablefields_clicktoedit_message_empty');
    340           }
    341         }
    342         return $pre . $themed_element . $post;
     141        return $pre . theme($theme, $element) . $post;
    343142      }
    344143      else {
    345144        // $node seems to be incomplete, so we reload it
    346         $node = node_load($node->nid, $revision);
    347         return $pre
    348           . drupal_get_form('editablefields_form', $node, $field_name, $delta)
    349           . $post;
    350       }
    351     }
    352   }
    353 }
    354 */
    355 
    356 function theme_editablefields_clicktoedit_message() {
    357   return '<span class="editablefields_clicktoedit_message editablefields-hide">'
    358     . t('[edit]') . '</span>';
    359 }
    360 
    361 function theme_editablefields_clicktoedit_message_empty() {
    362   return '<span class="editablefields_clicktoedit_message">' . t('[edit]')
    363     . '</span>';
     145        $node = node_load($node->nid);
     146        return $pre . drupal_get_form('editablefields_form', $node, $field_name, $delta) . $post;
     147      }
     148    }
     149  }
    364150}
    365151
     
    367153 * Implementation of hook_forms().
    368154 */
    369 function editablefields_forms($form_id) {
     155function editablefields_forms() {
    370156  $forms = array();
    371157  $forms['editablefields_form'] = array(
     
    381167function editablefields_form_builder(&$form_state, $node, $field_name, $delta) {
    382168  $field = content_fields($field_name);
     169
    383170  $form = array('#node' => $node);
    384   //  $form_state = array('values' => array($field['field_name'] => $default_value));
     171//  $form_state = array('values' => array($field['field_name'] => $default_value));
    385172  module_load_include('inc', 'content', 'includes/content.node_form');
    386173  $form['#field_info'] = array($field['field_name'] => $field);
     
    391178    unset($form[$field_name][0]['#title']);
    392179  }
    393 
    394   $form['editablefields_node_nid'] = array(
    395     '#type' => 'hidden',
    396     '#value' => $node->nid,
    397   );
    398180
    399181  $form['#field_info'] = array($field['field_name'] => $field);
     
    415197  return $form;
    416198}
    417 
    418199/**
    419200 * Menu callback: ajax view.
    420201 */
    421202function editablefields_view() {
    422   $output = '';
     203
    423204  $nid = arg(1);
    424205  $field_name = arg(2);
     
    426207  $node = node_load($nid);
    427208  drupal_set_header('Content-Type: text; charset=utf-8');
    428   //  $html = node_view($node, FALSE, FALSE, FALSE);
     209//  $html = node_view($node, FALSE, FALSE, FALSE);
    429210  // this required traversing the entire node to get the field (and doesn't work
    430211  // for checkboxes anyway)
     
    432213  $field = content_fields($field_name, $node->type);
    433214
    434   $field['display_settings']['label']['format'] = 'hidden';
     215  $field['display_settings']['label']['format']='hidden';
    435216  // We have 2 reasonable choices here. We COULD use 'clicktoedit' and end up
    436217  // with the same HTML - then we could strip that HTML down to remove the
     
    439220  // or we can simply use the 'defualt' formatter - which wont have the click to
    440221  // edit inside it  - and is hard coded into this module (for now) anyway!
    441   $field['display_settings']['full']['format'] = 'default';
    442   $html = content_view_field($field, $node);
    443 
     222  $field['display_settings']['full']['format']='default';
     223  $html=content_view_field($field,$node);
     224 
    444225  $messages = drupal_get_messages('status', TRUE);
    445226  if (count($messages) > 0) {
     
    452233
    453234  $object = new stdClass();
    454   $object->content =
    455     $output . $html . drupal_render($node->content[$field_name]);
     235  $object->content = $output . $html.drupal_render($node->content[$field_name]);
    456236  drupal_json($object);
    457237  exit();
     
    494274  $node = node_load($nid);
    495275
    496   $node_options = variable_get(
    497     'node_options_' . $node->type, array('status', 'promote'));
    498   $node->revision = in_array('revision', $node_options);
    499   if ($node->revision) {
    500     $node->log = t(
    501       '%field_name updated by editablefields.',
    502       array('%field_name' => $field_name)
    503     );
    504   }
    505 
    506276  if (node_access('update', $node)) {
    507277
     
    517287     * right value - I dislike this code - JMB */
    518288    if (is_array($node->{$field_name})) {
    519       $field = content_fields($field_name, $node->type);
    520 
    521       $items = &$form_state['values'][$field_name];
    522 
    523       if (empty($items)) {
    524         foreach (array_keys($field['columns']) as $column) {
    525           if ($field['multiple']) {
    526             $items[$delta][$column][] = NULL;
    527           }
    528           else {
    529             $items[$column] = NULL;
    530           }
    531         }
    532       }
    533 
    534       if (isset($items['value'])) {
    535         if (!($field['widget']['type'] == 'optionwidgets_buttons' &&
    536           $field['multiple'])) {
    537           $items = array($items);
    538         }
    539       }
    540 
    541       // go through content_set_empty if this is NOT a checkbox multi valued element
    542       if (!($field['widget']['type'] == 'optionwidgets_buttons' &&
    543         $field['multiple'])) {
    544         $items = content_set_empty($field, $items);
    545       }
    546 
    547       switch ($field['type']) {
    548         case 'nodereference':
    549         case 'userreference':
    550           if ($field['multiple']) {
    551             reset($field['columns']);
    552             $items[key($field['columns'])] = array_pop($items);
    553           }
    554           break;
    555       }
    556 
    557       drupal_execute('editablefields_form', $form_state, $node, $field_name,
    558         $delta
    559       );
    560 
     289      if (content_handle('widget', 'multiple values', $field) == CONTENT_HANDLE_CORE) {
     290        if (empty($form_state['values'][$field_name])) {
     291          $form_state['values'][$field_name]=array('value'=>0);
     292        }
     293      } else {
     294        if (empty($form_state['values'][$field_name][0])) {
     295          $form_state['values'][$field_name][0]=array('value'=>0);
     296        }
     297      }
     298
     299      drupal_execute('editablefields_form', $form_state, $node, $field_name, $delta);
     300     
    561301      $err = drupal_get_messages();
    562 
     302     
    563303      if (count($err) > 0) {
    564304        drupal_set_header('HTTP/1.1 404 Not Found');
     
    572312      }
    573313
    574       // the matrix field identifies itself as being multivalue, but in fact, it is not.
    575       if ((content_handle('widget', 'multiple values', $field)
    576         == CONTENT_HANDLE_CORE) && ($field['type'] != matrix)) {
    577         if ($node->{$field_name}[$delta] !=
    578           $form_state['values'][$field_name][0]) {
     314      $field = content_fields($field_name);
     315      if (content_handle('widget', 'multiple values', $field) == CONTENT_HANDLE_CORE) {
     316        if ($node->{$field_name}[$delta] != $form_state['values'][$field_name][0]) {
    579317          $node->{$field_name}[$delta] = $form_state['values'][$field_name][0];
    580318          node_save($node);
     
    592330    else {
    593331      drupal_set_header('HTTP/1.1 404 Not Found');
    594       print t('No field found, of name: %field',
    595               array('%field' => $field_name));
     332      print t('No field found, of name: %field', array('%field' => $field_name));
    596333    }
    597334  }
     
    602339  exit();
    603340}
    604 
    605 
    606 /**
    607  * If the Remove button was clicked remove the file from the node.
    608  */
    609 function editablefields_filefield_js($type_name, $field_name, $delta) {
    610   if (!empty($_POST['editablefields_node_nid']) &&
    611     $node = node_load($_POST['editablefields_node_nid'])) {
    612     $remove_button_clicked = FALSE;
    613     foreach ($_POST as $key => $value) {
    614       // check if the remove button was clicked
    615       if (stripos($key, $field_name) === 0 &&
    616         stripos($key, '_filefield_remove') !== FALSE) {
    617         $remove_button_clicked = TRUE;
    618         break;
    619       }
    620     }
    621 
    622     if ($remove_button_clicked) {
    623       $field = $_POST[$field_name];
    624       $field = array_pop($field);
    625       $file = (object)field_file_load($field['fid']);
    626 
    627       // respect revision settings
    628       $node_options = variable_get(
    629         'node_options_' . $node->type, array('status', 'promote'));
    630       $node->revision = in_array('revision', $node_options);
    631       if ($node->revision) {
    632         $node->log = t('%field_name updated by editablefields.',
    633           array('%field_name' => $field_name));
    634       }
    635 
    636       $file->field_name = $field_name;
    637       $references = field_file_delete($file);
    638 
    639       $node->{$field_name}[$delta] = array();
    640       node_save($node);
    641 
    642       drupal_set_message(t('File %filename was removed from node.',
    643         array('%filename' => $file->filename)));
    644     }
    645   }
    646 
    647   filefield_js($type_name, $field_name, $delta);
    648 }
    649 
    650 /**
    651  * Implementation of hook_file_insert().
    652  */
    653 function editablefields_file_insert($file) {
    654   if (stripos($_GET['q'], 'filefield/ahah/') === 0 && !empty(
    655   $_POST['editablefields_node_nid']) &&
    656     $node = node_load($_POST['editablefields_node_nid'])) {
    657     $file_clone = (array)$file;
    658     field_file_save($node, $file_clone);
    659 
    660     $q_arr = explode('/', $_GET['q']);
    661     $field_name = $q_arr[3];
    662     $delta = $q_arr[4];
    663 
    664     $node->{$field_name}[$delta] = array(
    665       'fid' => $file->fid
    666     );
    667 
    668     // respect revision settings
    669     $node_options = variable_get(
    670       'node_options_' . $node->type, array('status', 'promote'));
    671     $node->revision = in_array('revision', $node_options);
    672     if ($node->revision) {
    673       $node->log = t('%field_name updated by editablefields.',
    674         array('%field_name' => $field_name));
    675     }
    676 
    677     node_save($node);
    678   }
    679 }
    680 
    681 
    682 function editablefields_formatter_get_settings($field_name, $type_name, $context) {
    683   $options = array();
    684   $value = 'editablefields:'. $type_name .':'. $context .':'. $field_name;
    685   $options['editablefields'] = variable_get($value . '_text_formatter', 'default');
    686   /*
    687   $options['repeat']['show_repeat_rule'] = variable_get($value .'_show_repeat_rule', 'show');
    688   $options['multiple']['multiple_number'] = variable_get($value .'_multiple_number', '');
    689   $options['multiple']['multiple_from'] = variable_get($value .'_multiple_from', '');
    690   $options['multiple']['multiple_to'] = variable_get($value .'_multiple_to', '');
    691   $options['fromto']['fromto'] = variable_get($value .'_fromto', 'both')
    692   */
    693   return $options;
    694 }
    695 
    696 /**
    697  * Returns all 'editables' plugins.
    698  *
    699  * @return array
    700  */
    701 function editablefields_get_responders() {
    702   ctools_include('plugins');
    703   $plugins = ctools_get_plugins('editablefields', 'responders');
    704   foreach($plugins as &$plugin) {
    705     // add defaults
    706     $plugin += array(
    707       'hook_menu' => array(),
    708       'formatter_info' => array(),
    709     );
    710   }
    711   return $plugins;
    712 }
    713 
    714 function editablefields_get_editables() {
    715   ctools_include('plugins');
    716   $plugins = ctools_get_plugins('editablefields', 'editables');
    717   return $plugins;
    718 }
    719 /**
    720  * Menu wildcard argument callback.
    721  */
    722 function editablefields_object_load($object_id, $editable) {
    723   $editables = editablefields_get_editables();
    724   $function = $editables[$editable]['entity callback'];
    725   return $function($object_id);
    726 }
    727 
    728 /**
    729  * Implementation of hook_views_api().
    730  */
    731 function editablefields_views_api() {
    732   return array(
    733     'api' => 2,
    734     'path' => drupal_get_path('module', 'editablefields') . '/includes/views',
    735   );
    736 }
    737 
    738 function editablefields_views_option_form(&$form, &$form_state, $editable) {
    739   $form['editablefields_allowed'] = array(
    740     '#title' => t('Make field editable'),
    741     '#description' => t('This will override any other link you have set.'),
    742     '#type' => 'checkbox',
    743     '#default_value' => '',
    744   );
    745   $responders = editablefields_get_responders();
    746   $options = array();
    747 
    748   foreach($responders as $responder) {
    749     $options[$responder['name']] = $responder['title'];
    750   }
    751  
    752   $form['editablefields_responder'] = array(
    753     '#title' => t('Editable Behavior'),
    754     '#description' => t('How would you like to edit this field?'),
    755     '#type' => 'select',
    756     '#options' => $options,
    757     '#dependency' => array('edit-options-editablefields-allowed' =>  array('1')),
    758     '#process' => array('views_process_dependency')
    759   );
    760  
    761   $form['editablefields_editable'] = array(
    762     '#type' => 'hidden',
    763     '#value' => $editable,
    764   );
    765 }
Nota: Vea TracChangeset para ayuda en el uso del visor de conjuntos de cambios.