=== modified file 'jammer.install' --- jammer.install 2009-08-31 20:20:57 +0000 +++ jammer.install 2009-08-31 20:23:07 +0000 @@ -5,6 +5,11 @@ * Implementation of hook_uninstall(). */ function jammer_uninstall() { + variable_del('jammer_menu'); + variable_del('jammer_author'); + variable_del('jammer_path'); + variable_del('jammer_revision_information'); + variable_del('jammer_comment_settings'); variable_del('jammer_revision_log_textarea_unset_node_types'); variable_del('jammer_preview_button_unset_node_types'); variable_del('jammer_submit_button_unset_node_types'); === modified file 'jammer.module' --- jammer.module 2009-08-31 20:20:57 +0000 +++ jammer.module 2009-08-31 20:32:20 +0000 @@ -50,7 +50,23 @@ ); } } - if ($form['#id'] == 'node-form') { + if ($form['#id'] == 'node-form') { + if (in_array($form['type']['#value'], variable_get('jammer_menu_options', array()))) { + unset($form['menu']); + } + if (in_array($form['type']['#value'], variable_get('jammer_author_options', array()))) { + unset($form['author']); + } + if (in_array($form['type']['#value'], variable_get('jammer_path_options', array()))) { + unset($form['path']); + } + if (in_array($form['type']['#value'], variable_get('jammer_comment_settings', array()))) { + unset($form['comment_settings']); + } + if (in_array($form['type']['#value'], variable_get('jammer_revision_information', array()))) { + unset($form['revision_information']); + } + if (in_array($form['type']['#value'], variable_get('jammer_revision_log_textarea_unset_node_types', array())) && isset($form['revision_information']['log'])) { unset($form['revision_information']['log']); if (isset($form['revision_information']['revision']['#access']) && $form['revision_information']['revision']['#access'] == FALSE) { @@ -81,6 +97,62 @@ asort($options); $form = array(); + // Remove the menu settings + $form['jammer_menu_options'] = array( + '#type' => 'select', + '#title' => t('Remove the menu options on content types'), + '#options' => $options, + '#size' => count($options) < 6 ? count($options) : 6, + '#multiple' => TRUE, + '#default_value' => variable_get('jammer_menu_options', array()), + '#description' => t('The selected node types will no longer have a menu options listed when creating or editing a node of that type.') + ); + + // Remove the authoring settings + $form['jammer_author_options'] = array( + '#type' => 'select', + '#title' => t('Remove the author options on content types'), + '#options' => $options, + '#size' => count($options) < 6 ? count($options) : 6, + '#multiple' => TRUE, + '#default_value' => variable_get('jammer_author_options', array()), + '#description' => t('The selected node types will no longer have an author details options listed when creating or editing a node of that type.') + ); + + // Remove the path settings + $form['jammer_path_options'] = array( + '#type' => 'select', + '#title' => t('Remove the path options on content types'), + '#options' => $options, + '#size' => count($options) < 6 ? count($options) : 6, + '#multiple' => TRUE, + '#default_value' => variable_get('jammer_path_options', array()), + '#description' => t('The selected node types will no longer have the url options listed when creating or editing a node of that type.') + ); + + // Remove the comment settings + $form['jammer_comment_settings'] = array( + '#type' => 'select', + '#title' => t('Remove the comment options on content types'), + '#options' => $options, + '#size' => count($options) < 6 ? count($options) : 6, + '#multiple' => TRUE, + '#default_value' => variable_get('jammer_comment_settings', array()), + '#description' => t('The selected node types will no longer have the comment options listed when creating or editing a node of that type.') + ); + + // Remove the revision settings + $form['jammer_revision_information'] = array( + '#type' => 'select', + '#title' => t('Remove the revision options on content types'), + '#options' => $options, + '#size' => count($options) < 6 ? count($options) : 6, + '#multiple' => TRUE, + '#default_value' => variable_get('jammer_revision_information', array()), + '#description' => t('The selected node types will no longer have the revision options listed when creating or editing a node of that type.') + ); + + //Remove the Log textarea $form['jammer_revision_log_textarea_unset_node_types'] = array( '#type' => 'select', '#title' => t('Remove revision log textarea on content types'), @@ -90,6 +162,8 @@ '#default_value' => variable_get('jammer_revision_log_textarea_unset_node_types', array()), '#description' => t('The selected node types will no longer have a log textarea listed when creating or editing a node of that type.') ); + + //Remove the workflow form $form['jammer_workflow_form_unset_node_types'] = array( '#type' => 'select', '#title' => t('Remove workflow form from workflow tab on content types'),