When on /admin/config/media/browser and having lots of allowed file extensions in the textfield they are not easily readable. So changing it to textarea will be more user friendly.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

k.minkov’s picture

Adding a patch for this.

k.minkov’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, media-change-allowed-file-extensions-to-textarea-2066117.patch, failed testing.

k.minkov’s picture

Status: Needs work » Needs review
FileSize
916 bytes

Status: Needs review » Needs work

The last submitted patch, media-change-allowed-file-extensions-to-textarea-2066117-1.patch, failed testing.

longlivelance’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
2.76 KB

This new patch applies successfully to 7.x-2.x-dev.

Chris Matthews’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The 5 year old patch in #6 to media.module and mediafield.module does not apply to the latest media 7.x-2.x-dev and if still relevant needs to be rerolled.

Checking patch media.module...
error: while searching for:
 * UI.
 */
function media_form_field_ui_field_edit_form_alter(&$form, &$form_state) {
  // On file fields that use the media widget we need remove specific fields.
  if ($form['#field']['type'] == 'file' && $form['instance']['widget']['type']['#value'] == 'media_generic') {
    $form['instance']['settings']['file_extensions']['#title'] = t('Allowed file extensions for uploaded files');
    $form['instance']['settings']['file_extensions']['#maxlength'] = 255;
  }

  // On image fields using the media widget we remove the alt/title fields.
  if ($form['#field']['type'] == 'image' && $form['instance']['widget']['type']['#value'] == 'media_generic') {
    $form['instance']['settings']['alt_field']['#access'] = FALSE;
    $form['instance']['settings']['title_field']['#access'] = FALSE;
    $form['instance']['settings']['file_extensions']['#title'] = t('Allowed file extensions for uploaded files');
    // Do not increase maxlength of file extensions for image fields, since
    // presumably they will not need a long list of extensions.
  }
  if ($form['#instance']['entity_type'] == 'file') {
    $form['instance']['settings']['wysiwyg_override'] = array(

error: patch failed: media.module:330
error: media.module: patch does not apply

Checking patch modules/mediafield/mediafield.module...
joseph.olstad’s picture

Status: Needs work » Closed (outdated)

feel free to submit a rerolled patch and I will consider re-openning if you need this and want it reviewed