Project

General

Profile

Revision b0f0f4f2

Added by Florent Torregrosa over 9 years ago

Issue #592: Downgrade media to version 7.x-2.x-alpha4 and file_entity to version 7.x-2.0-beta1.

View differences:

drupal7/sites/all/modules/media/modules/media_bulk_upload/includes/media_bulk_upload.pages.inc
27 27
  $form = call_user_func_array('multiform_get_form', $forms);
28 28
  $form['#attributes']['class'][] = 'media-bulk-upload-multiedit-form';
29 29

  
30
  // Improve the display of each file form.
30
  // Add the title to each 'subform'.
31 31
  foreach (element_children($form['multiform']) as $key) {
32 32
    $fid = $form['multiform'][$key]['fid']['#value'];
33 33
    $file = $files[$fid];
34

  
35
    // Add the filename to each 'subform'.
36 34
    $title = t('<em>Edit @type</em> @title', array('@type' => $file->type, '@title' => $file->filename));
37 35
    $form['multiform'][$key]['#prefix'] = '<h2>' . $title . '</h2>';
38

  
39
    // Remove the 'replace file' functionality.
40
    $form['multiform'][$key]['replace_upload']['#access'] = FALSE;
41

  
42
    // Remove any actions.
43 36
    $form['multiform'][$key]['actions']['#access'] = FALSE;
44

  
45
    // Hide additional settings under a collapsible fieldset.
46
    $form['multiform'][$key]['settings'] = array(
47
      '#type' => 'fieldset',
48
      '#title' => t('Additional settings'),
49
      '#weight' => 99,
50
      '#collapsible' => TRUE,
51
      '#collapsed' => TRUE,
52
      // FAPI #collapsed and #collapsible not available in a render array.
53
      '#attached' => array(
54
        'js' => array(
55
          'misc/form.js',
56
          'misc/collapse.js',
57
        ),
58
      ),
59
      '#attributes' => array(
60
        'class' => array('collapsible', 'collapsed'),
61
      ),
62
    );
63

  
64
    $form['multiform'][$key]['settings']['additional_settings'] = $form['multiform'][$key]['additional_settings'];
65
    unset($form['multiform'][$key]['additional_settings']);
66 37
  }
67 38

  
68 39
  if (isset($form['buttons']['Delete'])) {

Also available in: Unified diff