Index: audio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.module,v
retrieving revision 1.148
diff -u -p -r1.148 audio.module
--- audio.module	3 Oct 2008 06:41:17 -0000	1.148
+++ audio.module	13 Oct 2008 17:33:38 -0000
@@ -600,6 +600,8 @@ function _audio_file_delete($file) {
  * Implementation of hook_form().
  */
 function audio_form(&$node, &$form_state) {
+  drupal_add_js(drupal_get_path('module', 'audio') .'/audio.js');
+
   $type = node_get_types('type', $node);
   if ($type->has_title) {
     $form['title']['#weight'] = -5;
@@ -723,11 +725,13 @@ function audio_form(&$node, &$form_state
     );
   }
 
+  $extensions = implode(', ', array_filter(explode(' ', variable_get('audio_allowed_extensions', 'mp3 wav ogg'))));
   $form['audio']['audio_upload'] = array(
     '#tree' => FALSE,
     '#type' => 'file',
     '#title' => empty($node->audio['file']->filename) ? t('Add a new audio file') : t('Replace this with a new file'),
-    '#description' => t('Click "Browse..." to select an audio file to upload. Only files with the following extensions are allowed: %allowed-extensions.', array('%allowed-extensions' => variable_get('audio_allowed_extensions', 'mp3 wav ogg'))) .'<br />'
+    '#attributes' => array('accept' => $extensions),
+    '#description' => t('Click "Browse..." to select an audio file to upload. Only files with the following extensions are allowed: %allowed-extensions.', array('%allowed-extensions' => $extensions)) .'<br />'
       . t('<strong>NOTE:</strong> the current PHP configuration limits uploads to %maxsize.', array('%maxsize' => format_size(file_upload_max_size()))),
   );
   $form['audio']['downloadable'] = array(
Index: images/audio_images.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/images/audio_images.module,v
retrieving revision 1.4
diff -u -p -r1.4 audio_images.module
--- images/audio_images.module	13 Oct 2008 16:27:56 -0000	1.4
+++ images/audio_images.module	13 Oct 2008 17:33:38 -0000
@@ -67,6 +67,8 @@ function audio_images_file_download($fil
 function audio_images_form_alter(&$form, &$form_state, $form_id) {
   // We only alter audio node edit forms with a file attached.
   if ($form_id == 'audio_node_form' && !empty($form['#node']->audio['file']->filepath)) {
+    drupal_add_js(drupal_get_path('module', 'audio') .'/audio.js');
+
     $form['#validate'][] = 'audio_images_node_form_validate';
 
     $form['audio_images'] = array(
@@ -104,6 +106,7 @@ function audio_images_form_alter(&$form,
       '#type' => 'file',
       '#title' => t('Add a new image'),
       '#tree' => FALSE,
+      '#attributes' => array('accept' => 'gif, jpg, jpeg, png'),
       '#description' => t('Click "Browse..." to select an image to add to this audio file. <strong>NOTE:</strong> Supported image types include GIF, JPG, and PNG.  Suggested dimensions: 170 X 170 pixels.'),
     );
   }
