<?php

/**
 * @file
 * 
 * Hides the node options on a node edit page.
 */
/**
 * Implementation of hook_form_alter().
 */
function hidenodeoptions_form_alter(&$form, &$form_alter, $form_id){
  if(isset($form['additional_settings'])){
    // Ensure the shortcut module CSS is added (prevents us from adding too
    // much to our own CSS).
    drupal_add_css(drupal_get_path('module', 'shortcut') . '/shortcut.css');
    $show = t('Show advanced settings');
    drupal_add_js(array(
      'hidenodeoptions' => array(
        'show' => $show,
        'hide' => t('Hide advanced settings')
      )
    ), 'setting');
    $form['additional_settings']['#prefix'] = '<div>
  <div class="hidenodeoptions-add-or-remove-shortcuts add-shortcut hidenodeoptions-link">
  	<a href="#">
  		<span class="icon"></span>
  		<span class="text hide hidenodeoptions-text">' . $show . '</span>
    </a>
  </div>
  <div style="clear:both;"></div>
	<div class="hidenodeoptions-tabs">';
    $form['additional_settings']['#suffix'] = '</div></div>';
  }
}