Index: cck_field_privacy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck_field_privacy/cck_field_privacy.module,v
retrieving revision 1.3.2.2.2.10
diff -u -p -r1.3.2.2.2.10 cck_field_privacy.module
--- cck_field_privacy.module	21 Mar 2009 20:46:15 -0000	1.3.2.2.2.10
+++ cck_field_privacy.module	3 Sep 2009 21:06:55 -0000
@@ -1,6 +1,9 @@
 <?php
 // $Id: cck_field_privacy.module,v 1.3.2.2.2.10 2009/03/21 20:46:15 obsidiandesign Exp $
 
+
+define('CCKFP_TITLE', 'Click here to change visibility rules');
+
 /* TODO
    There is a new hook_watchdog in core. This means that contributed modules
    can implement hook_watchdog to log Drupal events to custom destinations.
@@ -195,20 +198,20 @@ function cck_field_privacy_form_alter(&$
                 // @TODO: Add this via jQuery to degrade gracefully in browsers without JavaScript enabled.
                 // @TODO: Get the padlock to also appear on field group titles (fieldset legends), if selected.
                 if (isset($form_field['#title'])) {                  
-                  $form_field['#title'] .= "<a href='#' id='". $field ."link' ><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
+                  $form_field['#title'] .= "<a href='#' id='". $field ."link' title='" . variable_get('cckfp_title', CCKFP_TITLE) . "'><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
                   //email fields are special, they must be handled a bit differently.
                   if (in_array($form[$field][0]['#type'], array("email_textfield", "date_combo"))) {
-                    $form['#field_info'][$field]['widget']['label'] .= "<a href='#' id='". $field ."link' ><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
+                    $form['#field_info'][$field]['widget']['label'] .= "<a href='#' id='". $field ."link' title='" . variable_get('cckfp_title', CCKFP_TITLE) . "'><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
                   }
                 }
                 else if (isset($form[$field]['#title'])) {
-                  $form[$field]['#title'] .= "<a href='#' id='". $field ."link' ><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
+                  $form[$field]['#title'] .= "<a href='#' id='". $field ."link' title='" . variable_get('cckfp_title', CCKFP_TITLE) . "'><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
                 }
                 else if (isset($form_field[0]['#title'])) {
-                  $form_field[0]['#title'] .= "<a href='#' id='". $field ."link' ><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
+                  $form_field[0]['#title'] .= "<a href='#' id='". $field ."link' title='" . variable_get('cckfp_title', CCKFP_TITLE) . "'><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
                 }
                 else {
-                  $form['#field_info'][$field]['widget']['label'] .= "<a href='#' id='". $field ."link' ><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
+                  $form['#field_info'][$field]['widget']['label'] .= "<a href='#' id='". $field ."link' title='" . variable_get('cckfp_title', CCKFP_TITLE) . "'><img src='". base_path() . drupal_get_path('module', 'cck_field_privacy') ."/padlock.png' /></a>";
                 }
               }
             }
@@ -342,6 +345,13 @@ function cck_field_privacy_admin_setting
     }
   }
 
+  $form['cckfp_title'] = array(
+    '#type' => 'textarea',
+    '#title' => t('Icon Tool Tip'),
+    '#default_value' => variable_get('cckfp_title', CCKFP_TITLE),
+    '#description' => t('Set the text that will be displayed as a tool tip for the lock icon'),
+  );
+
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Save')
@@ -421,5 +431,7 @@ function cck_field_privacy_admin_setting
     }
   }
   variable_set('cckfp_values', serialize($stored_values));
+
+  variable_set('cckfp_title', $form_state['values']['cckfp_title']);
   drupal_set_message('Settings Changed.');
-}
\ No newline at end of file
+}
