Index: imagefield_widget.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/imagefield/imagefield_widget.inc,v
retrieving revision 1.40
diff -u -p -r1.40 imagefield_widget.inc
--- imagefield_widget.inc	18 Sep 2009 15:30:18 -0000	1.40
+++ imagefield_widget.inc	19 Oct 2009 04:44:07 -0000
@@ -44,8 +44,13 @@ function imagefield_widget_settings_form
     '#weight' => 8,
   );
   $form['alt_settings']['custom_alt'] = array(
-    '#type' => 'checkbox',
+    '#type' => 'radios',
     '#title' => t('Enable custom alternate text'),
+    '#options' => array(
+      t('Disabled'),
+      t('Optional'),
+      t('Required')
+    ),
     '#default_value' =>  !empty($widget['custom_alt']) ? $widget['custom_alt'] : 0,
     '#description' => t('Enable user input alternate text for images.'),
   );
@@ -233,6 +238,7 @@ function imagefield_widget_process($elem
     '#description' => t('This text will be used by screen readers, search engines, or when the image cannot be loaded.'),
     '#maxlength' => variable_get('imagefield_alt_length', 80), // See http://www.gawds.org/show.php?contentid=28.
     '#attributes' => array('class' => 'imagefield-text'),
+    '#required' => ( $field['widget']['custom_alt'] == 2 ) ? TRUE : FALSE,
   );
   // #value must be hard-coded if #type = 'value'.
   if ($default_alt) {
