Fix to add link on modules page to apfm page

seworthi - October 8, 2009 - 16:35
Project:Utility
Version:6.x-2.x-dev
Component:Permissions fieldsets
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

This should replace the existing code in the perms_fieldsets.module file (~line 83). The existing one does not create the link to the apfm (admin settings) page.

function perms_fieldsets_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
    case 'system_modules':
      // Neat idea to access the important settings directly from the admin page,
      // saves page loads from navigating to site configuration etc etc.
      $form['#theme'] = 'perms_fieldsets_theme';
      $form['description']['perms_fieldsets']['#value'] = l($form['description']['perms_fieldsets']['#value'], 'admin/settings/util/apfm');
      break;
  }
}

#1

seworthi - October 8, 2009 - 17:18

#2

seworthi - October 8, 2009 - 17:16

I just found that a piece is missing from the above code. Here is the full function:

function perms_fieldsets_form_alter(&$form, $form_state, $form_id) {
switch ($form_id) {
    case 'system_modules':
      // Neat idea to access the important settings directly from the admin page,
      // saves page loads from navigating to site configuration etc etc.
      $form['#theme'] = 'perms_fieldsets_theme';
      $form['description']['perms_fieldsets']['#value'] = l($form['description']['perms_fieldsets']['#value'], 'admin/settings/util/apfm');
      break;
    case 'user_admin_perm':
      $form['#theme'] = 'perms_fieldsets_theme';
      break;
  }
}

This makes the perms admin page work.

#3

NancyDru - October 9, 2009 - 15:32
Status:active» needs work

This breaks the system_modules module and probably the whole permissions page. I am seeing a link to the settings page; you should too unless you don't have the help module enabled.

#4

NancyDru - October 9, 2009 - 15:42
Status:needs work» fixed

I changed the links to not use hook_help.

#5

System Message - October 23, 2009 - 15:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.