You are here

function animate_any_settings_submit in Animate Any 7

Submit for animate_any_settings.

File

./animate_any.module, line 235
Add CSS3 cross-browser animation to any Drupal site.

Code

function animate_any_settings_submit($form, &$form_state) {

  // encode data in json to store in db
  if ($form_state['values']['op'] == 'Save Settings') {
    $identifiers = json_encode($form_state['values']['animate_fieldset']);
    $parent = $form_state['values']['parent_class'];
    $data = db_insert('animate_any');
    $data
      ->fields(array(
      'parent' => $parent,
      'identifier' => $identifiers,
    ));
    $data
      ->execute();
    if ($data) {
      drupal_set_message(t('Animation added for @parent.', array(
        '@parent' => $parent,
      )));
    }
  }
}