Index: rolecontact.module =================================================================== --- rolecontact.module (revision 6380) +++ rolecontact.module (working copy) @@ -94,7 +94,14 @@ '#title' => t('Page title'), '#required' => TRUE, '#default_value' => variable_get('rolecontact_profile_list_title', 'Staff List'), + '#description' => t("This is the label that appears at the top of the page listing the members of the selected role - e.g. Board of Directors"), ); + $form['rolecontact_role_label'] = array( + '#type' => 'textfield', + '#title' => t('Role Label'), + '#default_value' => variable_get('rolecontact_role_label', 'Staff'), + '#description' => t("This is the optional label that is prepended - separated by a hyphen - to each role member's name in the list on the Contact page to distinguish them from other list entries - e.g. Director - Francis Greatleader"), + ); $form['rolecontact_path'] = array( '#type' => 'textfield', '#title' => t('Path alias'), @@ -123,6 +130,9 @@ // Set the page title variable_set('rolecontact_profile_list_title', $form_values['rolecontact_title']); + // Set the role label + variable_set('rolecontact_role_label', $form_values['rolecontact_role_label']); + // Set the path alias path_set_alias('rolecontact_list'); if (isset($form_values['rolecontact_path']) && $form_values['rolecontact_path'] != '') { @@ -380,9 +390,12 @@ $result = db_num_rows(db_query("SELECT uid from {rolecontact} WHERE cid=%d", $key)); debug(__FUNCTION__ ." result = $result for key = $key"); if ($result) { - $rolecontact_options[$key] = "Staff - ". $form['cid']['#options'][$key]; - } - else { + $role_label = variable_get('rolecontact_role_label','Staff'); + if ($role_label != "") { + $role_label .= " - "; + } + $rolecontact_options[$key] = $role_label.$form['cid']['#options'][$key]; + } else { $contact_options[$key] = $form['cid']['#options'][$key]; } }