Projet

Général

Profil

Révision 2b3c8cc1

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

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
  // Add the title to each 'subform'.
30
  // Improve the display of each file form.
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'.
34 36
    $title = t('<em>Edit @type</em> @title', array('@type' => $file->type, '@title' => $file->filename));
35 37
    $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.
36 43
    $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']);
37 66
  }
38 67

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

Formats disponibles : Unified diff