You are here

function oa_appearance_edit_form in Open Atrium Appearance 7.2

Theme colors edit variable form.

1 string reference to 'oa_appearance_edit_form'
oa_appearance_menu in ./oa_appearance.module
Implements hook_menu().

File

./oa_appearance.module, line 236
Provides integration between Open Atrium and Colorizer module

Code

function oa_appearance_edit_form($form, &$form_state, $entity_type, $entity_id) {
  module_load_include('admin.inc', 'colorizer');
  $form = colorizer_admin_form(FALSE, FALSE);
  $form['#entity_type'] = $entity_type;
  $form['#entity_id'] = $entity_id;

  // We always write to the current Spaces instance, even if we are inheriting
  // the current colors from the parent. This allows us to switch to our local
  // settings by saving this form.
  $form['instance']['#value'] = $GLOBALS['theme'] . '_' . $entity_id;
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save configuration'),
  );
  $form['actions']['save_default'] = array(
    '#type' => 'submit',
    '#value' => t('Save as default'),
  );
  $form['colorizer_clearcache'] = array(
    '#type' => 'submit',
    '#value' => t('Clear Colorizer Cache'),
  );
  return $form;
}