When I look at the WEB tab of the media browser, the cancel button appears before the input fields and the submit button.

Image attached...

Comments

medden’s picture

StatusFileSize
new717 bytes

I solved this issue by removing line 100 from modules/media_internet/media_internet.module
The line read:
$form['actions'] = array('#type' => 'actions');

It appeared here:media

 95   if (count($form['providers']) == 1) {
 96     // Just the header, no actual providers
 97     unset($form['providers']['header']);
 98   }
 99
100   //***REMOVED THIS LINE***  $form['actions'] = array('#type' => 'actions');
101   $form['actions']['submit'] = array('#type' => 'submit', '#value' => t('Submit'));
102   return $form;
103 }
104
105 /**
106  * Allow stream wrappers to have their chance at validation.

Will test and post a patch. Can anyone tell me what that line did?

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new2.37 KB

I think actually standardizing on requiring the use of $form['actions'] is better here. Alternative patch that fixes the bug ordering for the web tab.

Status: Needs review » Needs work

The last submitted patch, 1328652-browser-form-button-actions.patch, failed testing.

dave reid’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1328652-browser-form-button-actions.patch, failed testing.

dave reid’s picture

Status: Needs work » Fixed

Committed #2 to Git.
http://drupalcode.org/project/media.git/commit/5a55fe5

Also added a change notice for browser plugins: http://drupal.org/node/1342732

medden’s picture

Not sure if it's related to this patch, but since I downloaded the latest dev, I now have no cancel buttons on my 'Upload' and 'Web' tabs. The cancel button is correctly placed on the 'media library' tab though.

Thanks

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.