You are here

function blockanimate_form_alter in BlockAnimate 7

Implements hook_form_alter().

Alter block edit form to add block's animate css and wow JS configuration fields.

File

./blockanimate.module, line 93
Add CSS3 cross-browser animation to any Drupal block.

Code

function blockanimate_form_alter(&$form, &$form_state, $form_id) {
  if (user_access('administer block animate') && ($form_id == 'block_admin_configure' || $form_id == 'block_add_block_form')) {

    // Load statically cached block object used to display the form.
    $block = block_load($form['module']['#value'], $form['delta']['#value']);
    _blockanimate_add_form_fieldset($form);
    _blockanimate_add_form_animate_css_fields($form, $block);
    _blockanimate_add_form_wow_js_fields($form, $block);
    $form['#submit'][] = 'blockanimate_form_submit';
  }
}